Преглед на файлове

upd schema min occurs error

a.binder преди 8 години
родител
ревизия
99314d3d69

+ 11 - 10
SE/schema/ant-object/default_db.BI_audit_operational_raport_note/BI_audit_operational_raport_note/BI_audit_operational_raport_note.xsd

@@ -30,14 +30,12 @@
       schemaLocation="../../default_db.BI_audit_KRS/BI_audit_KRS/BI_audit_KRS.xsd"/>
    <xs:import namespace="https://biuro.biall-net.pl/wfs/default_db/table/BI_audit_CEIDG.xsd"
       schemaLocation="../../default_db.BI_audit_CEIDG/BI_audit_CEIDG/BI_audit_CEIDG.xsd"/>
-   
    <xs:simpleType name="action_Type" id="raport_note___d5e6216-1_A_rapt">
       <xs:restriction base="xs:string">
          <xs:enumeration value="IGNORE"/>
          <xs:enumeration value="REPORT"/>
       </xs:restriction>
    </xs:simpleType>
-   
    <xs:simpleType name="A_STATUS_Type" id="raport_note___d5e6216-1_A_STATUS_T">
       <xs:restriction base="xs:string">
          <xs:enumeration value="NORMAL"/>
@@ -49,7 +47,6 @@
          <xs:enumeration value="OFF_HARD"/>
       </xs:restriction>
    </xs:simpleType>
-   
    <xs:complexType name="BI_audit_operational_raport_note" id="raport_note___d5e6225-1_BI_audit_o">
       <xs:annotation>
          <xs:documentation>Baza operacyjnych notatek umożliwiająca ignorowanie obiektu lub wskazywanie w raporcie informacji powiązanych dla obiektu w specjalny sposób.</xs:documentation>
@@ -61,7 +58,8 @@
                <xs:documentation>Opis/notatka kontekstu danego obiektu (Pracownik, KRS, Osoba) z jakimś zdarzeniem/podejrzeniem, z powodu którego należy dany rekord ignorować lub dodatkowo raportować w specjalny widoczny sposób w raporcie.</xs:documentation>
             </xs:annotation>
          </xs:element>
-         <xs:element name="long_note" type="xs:string" id="raport_note___d5e6235-1_long_note">
+         <xs:element name="long_note" type="xs:string" id="raport_note___d5e6235-1_long_note"
+            minOccurs="0">
             <xs:annotation>
                <xs:documentation>W przypadku długich opisów w notatce, należy w tym polu wprowadzić informacje, przekraczające 255 znaków.</xs:documentation>
             </xs:annotation>
@@ -79,22 +77,25 @@
          <xs:element name="A_RECORD_UPDATE_AUTHOR" type="xs:string" id="raport_note___d5e6239-RUA"/>
          <xs:element name="A_STATUS"
             type="default_db__x3A__BI_audit_operational_raport_note:A_STATUS_Type"
-            id="raport_note___d5e6243-1_A_STATUS"/>
-         <xs:element name="A_STATUS_INFO" type="xs:string" id="raport_note___d5e6244-1_A_STATUS_I"/>
+            id="raport_note___d5e6243-1_A_STATUS" minOccurs="0"/>
+         <xs:element name="A_STATUS_INFO" type="xs:string" id="raport_note___d5e6244-1_A_STATUS_I"
+            minOccurs="0"/>
          <xs:element name="L_APPOITMENT_USER" type="xs:string"
-            id="raport_note___d5e6245-1_L_APPOITME">
+            id="raport_note___d5e6245-1_L_APPOITME" minOccurs="0">
             <xs:annotation>
                <xs:documentation>Osoba odpowiedzialna za daną notatkę/przypomnienie/kontynuację działania.</xs:documentation>
             </xs:annotation>
          </xs:element>
          <xs:element name="L_APPOITMENT_DATE" type="xs:dateTime"
-            id="raport_note___d5e6244-1_LAPPDate">
+            id="raport_note___d5e6244-1_LAPPDate" minOccurs="0">
             <xs:annotation>
                <xs:documentation>Data przypomnienia.</xs:documentation>
             </xs:annotation>
          </xs:element>
-         <xs:element name="A_CLASSIFIED" type="xs:string" id="raport_note___d5e6246-1_A_CLASSIFI"/>
-         <xs:element name="A_ADM_COMPANY" type="xs:string" id="raport_note___d5e6247-1_A_ADM_COMP"/>
+         <xs:element name="A_CLASSIFIED" type="xs:string" id="raport_note___d5e6246-1_A_CLASSIFI"
+            minOccurs="0"/>
+         <xs:element name="A_ADM_COMPANY" type="xs:string" id="raport_note___d5e6247-1_A_ADM_COMP"
+            minOccurs="0"/>
          <xs:element ref="default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY"
             maxOccurs="unbounded" minOccurs="0" id="raport_note___d5e6243-1"/>
          <xs:element ref="default_db__x3A__BI_audit_ENERGA_FAKTURY:BI_audit_ENERGA_FAKTURY"

+ 1 - 0
SE/schema/default_db_xml_cache.public/build_ant_universal_by_xsl_match.xsl

@@ -103,6 +103,7 @@
     <xsl:template mode="build_tr_map.xml" match="build_cache">
         <sequential>
             <tempfile property="{with-param/@select}{with-param/@name}" deleteonexit="yes"><xsl:attribute name="destdir" select="'${detect_resource_type.local}'"/></tempfile>
+            <echo>creating <xsl:value-of select="with-param/@select"/>:<xsl:value-of select="with-param/@name"/></echo>
             <xslt basedir="./"    destdir="./"   out="${with-param/@select}{with-param/@name}">
                 <xsl:attribute name="style" select="'${p5_tr_map.xsl}'"/>
                 <xsl:attribute name="in" select="'${empty.xml}'"/>

+ 200 - 22
SE/schema/default_db_xml_cache.public/build_object_install_se_ant_object.xsl

@@ -65,14 +65,14 @@
             <xsl:attribute name="found" select="$system_cache__appinfo:vrtfNamespaces//node()[local-name()='ns'][@uri=$targetNamespace][1]/@prefix" />
             <!-\-<xsl:copy-of select="$vrtfNamespaces"/>-\->
         </prefix>-->
-        <xsl:variable name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
+        <xsl:variable name="current.schema" select="."/><xsl:variable name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
             <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external">
                 <xsl:with-param name="prefix" select="$prefix"/>
                 <xsl:with-param name="targetNamespace" select="@targetNamespace"/>
                 <xsl:with-param name="prefix_root" select="$prefix"/>
                 <xsl:with-param name="targetNamespace_root" select="@targetNamespace"/>
                 <xsl:with-param name="system_cache__appinfo:document-uri-orig"></xsl:with-param>
-            </xsl:apply-templates>
+            <xsl:with-param name="current.schema" select="$current.schema"/></xsl:apply-templates>
         </xsl:variable>
         
         
@@ -113,7 +113,7 @@
                         <xsl:namespace name="{@prefix}" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace_final(@targetNamespace)"/>
                     </xsl:for-each-group>
                     
-                    <xsl:namespace name="{$schema.prefix}" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace_final($schema.targetNamespace)"/>
+                    <xsl:namespace name="xs" select="'http://www.w3.org/2001/XMLSchema'"/><xsl:namespace name="{$schema.prefix}" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace_final($schema.targetNamespace)"/>
                     
                     <xsl:namespace name="system_cache__appinfo" select="'http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd'"/>
                     <xsl:namespace name="p5Type" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
@@ -121,7 +121,7 @@
                         <!--<xsl:copy-of select="@*"/>-->
                         <xsl:apply-templates select="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables_schema"/>
                     <xsl:attribute name="system_cache__appinfo:document-uri-orig" select="$system_cache__appinfo:document-uri-orig"/>
-                    <xsl:comment>#92 including</xsl:comment>
+                    <xsl:attribute name="debig.106.count" select="count(current-group())"/><xsl:comment>#92 including</xsl:comment>
                     <!--<generate_tables_from_external_root.required_by.path_init>
                         <xsl:copy-of select=" current-group()/generate_tables_from_external_root.required_by.path_init/*" xpath-default-namespace=""/>
                     </generate_tables_from_external_root.required_by.path_init>-->
@@ -131,9 +131,9 @@
                             <xsl:attribute name="schemaLocation" select="concat(@prefix,'.xsd')"/>
                         </xsl:element>
                     </xsl:for-each-group>
-                    <xsl:comment>#81 now groping by type and @lat_token</xsl:comment>
+                    <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.import" select="$current.schema/*"/><xsl:comment>#81 now groping by type and @lat_token</xsl:comment>
                     <xsl:for-each-group select="current-group()" group-by="concat(@targetNamespace,name())">
-                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema" select=".">
+                        <xsl:comment>#136 grouping schema elements count=<xsl:value-of select="count(current-group())"/></xsl:comment><xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema" select=".">
                             <xsl:with-param name="prefix" select="$prefix"/>
                             <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
                             <xsl:with-param name="prefix_root" select="$prefix"/>
@@ -152,7 +152,7 @@
                 <xsl:message >#138 $ant-obj-save-path element/@name=<xsl:value-of select="@name"/> <xsl:value-of select="$ant-obj-save-path"/></xsl:message>
                 
                 <xsl:result-document href="{$ant-obj-save-path}">
-                    <xsl:apply-templates select="../../."  mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element">
+                    <xsl:apply-templates select="../../."  mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.schema">
                         <xsl:with-param name="name" select="@name"/>
                     </xsl:apply-templates>
                 </xsl:result-document>
@@ -166,7 +166,7 @@
         
     </xsl:template>
     
-    <xsl:template match="schema" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
+    <xsl:template match="schema" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
         <xsl:param name="name" required="yes"/>
         <xsl:element name="{name()}"  namespace="http://www.w3.org/2001/XMLSchema">
             <xsl:copy-of select="namespace::node()"/>
@@ -174,21 +174,33 @@
             <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element">
                 <xsl:with-param name="name" select="$name"/>
             </xsl:apply-templates>
-        </xsl:element>
+        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element" select="*//system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root">
+                <xsl:with-param name="name" select="$name"/>
+            </xsl:apply-templates></xsl:element>
     </xsl:template>
     
     <xsl:template match="element[@name]" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
         <xsl:param name="name" required="yes"/>
         <xsl:choose>
             <xsl:when test="@name=$name">
-                <xsl:copy-of select="."/>
-            </xsl:when>
-        </xsl:choose>
+                <xsl:element name="{name()}">
+                    <xsl:copy-of select="@*"/>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.child"/>
+                </xsl:element></xsl:when>
+        <xsl:otherwise>
+                <xsl:comment>#198 uwanted root name <xsl:value-of select="name()"/>;</xsl:comment>
+                <xsl:element name="{name()}">
+                    <xsl:copy-of select="@*"/>
+                    <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.child"/>
+                </xsl:element>
+            </xsl:otherwise></xsl:choose>
     </xsl:template>
     
-    <xsl:template match="complexType|simpleType|import" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
-        <xsl:copy-of select="."/>
-    </xsl:template>
+    <xsl:template match="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" /><xsl:template match="complexType|simpleType|import" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+    <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.child"/>
+        </xsl:element></xsl:template>
     
     <!--<xsl:template match="schema[ not(@targetNamespace = 'external_schema__ksiegi_wieczyste__zsin_1013.xsd')]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:comment>#67 temporary bypased : <xsl:value-of select="@targetNamespace"/> ;  to analyze one schema scenario!</xsl:comment>
@@ -199,7 +211,16 @@
     
     
     <!-- (((( SCHEMA PARSERS PREFIX NAMESPACES ))) -->
-         <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema">
+         <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
+                <xsl:element name="{name()}">
+                    <xsl:copy-of select="@*"/>
+                    <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.child"/>
+                </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="simpleSchema" mode="system_cache__appinfo:object_install_se_ant_object.ant-object.unique_element.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
+        <xsl:message terminate="yes"> #232 unanteded - todo upgrade for element <xsl:value-of select="name()"/> / @name <xsl:value-of select="@name"/> ; @id = <xsl:value-of select="@id"/></xsl:message>
+    </xsl:template><xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_schema">
              <xsl:param name="targetNamespace" required="yes"/>
              <xsl:param name="prefix" required="yes"/>
              <xsl:param name="prefix_root"  required="yes"/>
@@ -667,7 +688,8 @@
         <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
             <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
             <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
-            <xsl:element name="{name()}">
+            <xsl:attribute name="prefix" select="$prefix"/>
+            <xsl:attribute name="targetNamespace" select="$targetNamespace"/><xsl:element name="{name()}">
                 <!--<xsl:copy-of select="@*"/>-->
                 <xsl:apply-templates select="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root_element_force_type_element">
                     <xsl:with-param name="generate_tables_from_external_root.path" select="concat($generate_tables_from_external_root.path,'/',$generate_tables_from_external_root.name)"/>
@@ -965,7 +987,7 @@
         </xsl:element>
     </xsl:template>
     
-    <xsl:template match="element[@type and not(complexType)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+    <xsl:template match="element[@type and not(complexType) ]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="generate_tables_from_external_root.name" select="@type"/>
         <xsl:param name="generate_tables_from_external_root.path" select="@type"/>
         <xsl:param name="targetNamespace" required="yes"/>
@@ -979,7 +1001,29 @@
                         <xsl:comment>#203a - type typu xs:</xsl:comment>
                         <!--<xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_element" select="."/>-->
                     </xsl:when>
-                    <xsl:otherwise>
+                    <xsl:when test="simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+                        <!--<xsl:variable name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.create_targetNamespace($targetNamespace_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>
+                        <xsl:variable name="prefix" select="system_cache__appinfo:object_install_se_ant_object.create_prefix($prefix_root,system_cache__appinfo:object_install_se_ant_object.root_complextype( complexType,@name))"/>-->
+                        <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType"  select="@*">
+                            <xsl:with-param name="prefix" select="$prefix"/>
+                            <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                            <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                            <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                        </xsl:apply-templates>
+                        <!--<xsl:copy-of select="@*"/>--> <!-- consider @type = default_db__x3A__ADMIN_USERS:ADMIN_USERS__A_STATUS -->
+                        <system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                            <xsl:attribute name="generate_tables_from_external_root.name" select="$generate_tables_from_external_root.name"/>
+                            <xsl:attribute name="generate_tables_from_external_root.path" select="$generate_tables_from_external_root.path"/>
+                            
+                            <xsl:comment>#203b.1 - type innego typu niż xs: - dla simpleType przypadek ADMIN_USERS/A_STATUS</xsl:comment>
+                            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType" >
+                                <xsl:with-param name="prefix" select="$prefix"/>
+                                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+                            </xsl:apply-templates>
+                        </system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_root>
+                    </xsl:when><xsl:otherwise>
                         <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type" select="@*">
                             <xsl:with-param name="prefix" select="$prefix"/>
                             <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
@@ -1013,7 +1057,122 @@
             </xsl:element>
     </xsl:template>
     
-    <xsl:template match="annotation" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+    <xsl:template match="@*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:copy-of select="."/>
+    </xsl:template>
+    <xsl:template match="@type" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+       <!-- <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>-->
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:attribute name="type" select="concat($prefix,':',system_cache__appinfo:clean_object_prefix(current()))"/>
+    </xsl:template>
+    
+    <xsl:template match="simpleType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="system_cache__appinfo:debug">#1069 from simpleType</xsl:attribute>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child">
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+            </xsl:apply-templates>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="system_cache__appinfo:debug">#1069 from simpleType</xsl:attribute>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child">
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+            </xsl:apply-templates>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="restriction" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="system_cache__appinfo:debug">#1069 from simpleType</xsl:attribute>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child.restriction">
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+            </xsl:apply-templates>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child.restriction" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="system_cache__appinfo:debug">#1069 from simpleType</xsl:attribute>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child.restriction">
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix_root" select="$prefix_root"/>
+                <xsl:with-param name="targetNamespace_root" select="$targetNamespace_root"/>
+            </xsl:apply-templates>
+        </xsl:element>
+    </xsl:template>
+    
+    <!--<xsl:template match="restriction" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child.restriction" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:message terminate="yes">#1079 To be upgraded - propably multiple simpleType derivation to be root element exponed! @id=<xsl:value-of select="@id"/></xsl:message>
+    </xsl:template>-->
+    
+    <xsl:template match="restriction[@base='xs:anyAtomicType']" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child.restriction" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
+        
+    
+    
+    <xsl:template match="simpleType" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="generate_tables_from_external_root.name" select="@name"/>
+        <xsl:param name="generate_tables_from_external_root.path" select="@name"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="prefix_root"  required="yes"/>
+        <xsl:param name="targetNamespace_root" required="yes"/>
+        <xsl:message terminate="yes">#1096 To be upgraded - propably multiple simpleType derivation to be root element exponed!</xsl:message>
+        <!--<xsl:variable name="generate_tables_from_external_root.path_new" select="@name"/>-->
+        <!--<xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:attribute name="system_cache__appinfo:debug">#1069 from simpleType</xsl:attribute>
+            <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_type.simpleType.child"/>
+        </xsl:element>-->
+    </xsl:template><xsl:template match="annotation" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_child_force_refered_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:comment>suppressed annotation <xsl:copy-of select=".//text()"/></xsl:comment>
     </xsl:template>
     
@@ -1257,7 +1416,13 @@
                         </xsl:for-each>
                     </generate_tables_from_external_root.required_by.path_init>
                 </xsl:when>
-            </xsl:choose>
+            <xsl:otherwise>
+                    <xsl:comment>
+                        #12688 suppressed for <xsl:value-of select="name()"/> /<xsl:value-of select="@name"/>
+                            ------
+                                <xsl:copy-of select="@*"/>
+                                            </xsl:comment>
+                </xsl:otherwise></xsl:choose>
             <xsl:apply-templates mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external_mktables"/>
         </xsl:element>
     </xsl:template>
@@ -1418,7 +1583,20 @@
         </xsl:choose>
     </xsl:template>
     
-    <xsl:template match="*|text()|comment()" mode="system_cache__appinfo:object_install_se_ant_object.root_complextype" />
+    <xsl:template match="*" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.import" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
+      
+    <xsl:template match="import[ contains(@namespace,$default_db_targetNamespace_detect_string)]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.import" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:element name="{name()}">
+            <xsl:attribute name="namespace" select="@namespace"/>
+            <xsl:variable name="schemaLocation" select="system_cache__appinfo:get_default_db_obj_url_table_name(@namespace)"/>
+            <xsl:attribute name="schemaLocation" select="$schemaLocation"/>
+        </xsl:element>
+    </xsl:template>
+    
+    <xsl:template match="import[ not(contains(@namespace,$default_db_targetNamespace_detect_string))]" mode="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.import" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:message>#1646 ignored <xsl:copy-of select="@namespace"/>; not matched = <xsl:value-of select="$default_db_targetNamespace_detect_string"/></xsl:message>
+        <xsl:comment>#1646 ignored <xsl:copy-of select="@namespace"/>; not matched = <xsl:value-of select="$default_db_targetNamespace_detect_string"/></xsl:comment>
+    </xsl:template><xsl:template match="*|text()|comment()" mode="system_cache__appinfo:object_install_se_ant_object.root_complextype" />
         
     
     

+ 4 - 4
SE/schema/default_db_xml_cache.public/get_wfs_recurse_xsl.xsl

@@ -235,7 +235,7 @@
                        <xsl:copy-of select="$OGC_Filter"/>
                    </Filter>-->
         </xsl:if>
-        <xsl:variable name="request_string" select="concat('?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&amp;SRSNAME=EPSG:3003&amp;MAXFEATURES=15')"/>
+        <xsl:variable name="request_string" select="concat('?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&amp;SRSNAME=EPSG:3003')"/>
         <xsl:variable name="url_string" select="concat($protocol,$username,':',$username.pass,'@',$api,'/',$targetNamespace_DEFAULTS_prefix,'/',$request_string)"/>
         <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($url_string)"/>
         <xsl:if test="$debug &gt; 5">
@@ -247,7 +247,7 @@
                 <!--<xsl:copy-of select="$wfs_response"/>-->
                 
                 <!--<xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response"/>-->
-            </wfs_response>
+            <xsl:copy-of select="$get_wfs_recurse_xsl:wfs_response"/></wfs_response>
         </xsl:if>
         <xsl:apply-templates mode="after_first_ant_assing_vars" select="$get_wfs_recurse_xsl:GetsimpleSchema">
             <xsl:with-param name="get_wfs_recurse_xsl:wfs_response" select="$get_wfs_recurse_xsl:wfs_response"/>
@@ -317,7 +317,7 @@
                           <xsl:copy-of select="$OGC_Filter"/>
                       </Filter>-->
         </xsl:if>
-        <xsl:variable name="request_string" select="concat('?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&amp;SRSNAME=EPSG:3003&amp;MAXFEATURES=15')"/>
+        <xsl:variable name="request_string" select="concat('?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&amp;SRSNAME=EPSG:3003')"/>
         <xsl:variable name="url_string" select="concat($protocol,$username,':',$username.pass,'@',$api,'/',$targetNamespace_DEFAULTS_prefix,'/',$request_string)"/>
         <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($url_string)"/>
         <xsl:if test="$debug &gt; 5">
@@ -382,7 +382,7 @@
                       <xsl:copy-of select="$OGC_Filter"/>
                   </Filter>-->
         
-        <xsl:variable name="request_string" select="concat('?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&amp;SRSNAME=EPSG:3003&amp;MAXFEATURES=15')"/>
+        <xsl:variable name="request_string" select="concat('?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=',$get_wfs_recurse_xsl:typeNameRealResource,$OGC_Filter,'&amp;SRSNAME=EPSG:3003')"/>
         <xsl:variable name="url_string" select="concat($protocol,$username,':',$username.pass,'@',$api,'/',$targetNamespace_DEFAULTS_prefix,'/',$request_string)"/>
         <xsl:variable name="get_wfs_recurse_xsl:wfs_response" select="doc($url_string)"/>
         <xsl:if test="$debug &gt; 4">