a.binder 6 lat temu
rodzic
commit
90225f3929

+ 54 - 1
SE/schema/default_db_xml_cache/build_complexType.xsl

@@ -2086,6 +2086,8 @@
         </xsl:element>
     </xsl:template>  
   
+  
+  
     <xsl:template match="simpleType" mode="system_cache__appinfo:build_flat_schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
         <xsl:param name="path" required="yes"/>
         <xsl:param name="prefix" required="yes"/>
@@ -2095,9 +2097,60 @@
         <xsl:param name="restriction_path"/>
         <xsl:param name="system_cache__appinfo:root_element_in_schema"/> <!-- @2016-01-16 w przypadku elementow na glownym schemacie, nalezy przetworzyc i wyswietlic simpleType, aby p5_tr_map stworzylo 428a do tego . W przypadku elementow skladowych complexContent na razie nie przetwarzamy simpleType z racji komplikacji przetwarzania p5_tr_map -->
         <!--<xsl:message>209: simpleType applied! system_cache__appinfo:root_element_in_schema:<xsl:value-of select="$system_cache__appinfo:root_element_in_schema"/>;</xsl:message>-->
+        
+        
+        
+        
+        <xsl:comment>209A: simpleType applied! system_cache__appinfo:root_element_in_schema:<xsl:value-of select="$system_cache__appinfo:root_element_in_schema"/>; </xsl:comment>
+        <!-- TODO @2015-11-04 TODO REM REM!!!--> 
+        <!--  <xsl:choose>
+            <xsl:when test="$system_cache__appinfo:root_element_in_schema='true'">-->
+        <xsl:element name="{name()}">
+            <xsl:attribute name="system_cache__appinfo:mode__build_flat_schema__match_simpleType_line" select="'1408'"/>
+            <!--<xsl:attribute name="system_cache__appinfo:mode__build_flat_schema__parent_node_name" select="parent::node()/local-name()"/>-->
+            <xsl:attribute name="system_cache__appinfo:namespace_uri" select="$targetNamespace"/>
+            <xsl:if test="parent::node()/local-name()='schema'">
+                <xsl:attribute name="system_cache__appinfo:root_element_in_schema" select="true()"/>
+            </xsl:if>
+            <xsl:apply-templates mode="#current" select="@*">
+                <xsl:with-param name="path" select="$path"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="restriciction_base" select="$restriction_base"/>
+                <xsl:with-param name="xpath_local" select="$xpath_local"/>
+            </xsl:apply-templates>
+            <!--<xsl:apply-templates mode="system_cache__appinfo:build_flat_schema_simpleType_type" select="@*">
+                         <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                         <xsl:with-param name="path" select="$path"/>
+                         <xsl:with-param name="prefix" select="$prefix"/>
+                         <xsl:with-param name="xpath_local" select="$xpath_local"/>
+                     </xsl:apply-templates>-->
+            <xsl:apply-templates mode="system_cache__appinfo:build_flat_schema_simpleType"> <!-- _simpleType TODO trzeba inaczej przetwarzac typy proste, bo cos sie loopuje @2015-10-->
+                <xsl:with-param name="path" select="$path"/>
+                <xsl:with-param name="targetNamespace" select="$targetNamespace"/>
+                <xsl:with-param name="prefix" select="$prefix"/>
+                <xsl:with-param name="restriction_base" select="$restriction_base"/>
+                <xsl:with-param name="xpath_local" select="$xpath_local"/>
+            </xsl:apply-templates>
+        </xsl:element>
+        <!--</xsl:when>
+            <xsl:otherwise><xsl:comment>1096: simpleType applied! system_cache__appinfo:root_element_in_schema:<xsl:value-of select="$system_cache__appinfo:root_element_in_schema"/>;</xsl:comment></xsl:otherwise>
+        </xsl:choose>-->
+    </xsl:template>
+  
+  
+    <xsl:template match="simpleType[@name]" mode="system_cache__appinfo:build_flat_schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
+        <xsl:param name="path" required="yes"/>
+        <xsl:param name="prefix" required="yes"/>
+        <xsl:param name="targetNamespace" required="yes"/>
+        <xsl:param name="restriction_base"/>
+        <xsl:param name="xpath_local"/>
+        <xsl:param name="restriction_path"/>
+        <xsl:param name="system_cache__appinfo:root_element_in_schema"/> <!-- @2016-01-16 w przypadku elementow na glownym schemacie, nalezy przetworzyc i wyswietlic simpleType, aby p5_tr_map stworzylo 428a do tego . W przypadku elementow skladowych complexContent na razie nie przetwarzamy simpleType z racji komplikacji przetwarzania p5_tr_map -->
+        <!--<xsl:message>209: simpleType applied! system_cache__appinfo:root_element_in_schema:<xsl:value-of select="$system_cache__appinfo:root_element_in_schema"/>;</xsl:message>-->
         <xsl:variable name="if-prepare" select="unparsed-text-available(system_cache__appinfo:element-filename.prepare('build_complexType__simpleType',@name,$prefix,$targetNamespace))"/>
         <xsl:variable name="name" select="@name"/>
-        <xsl:variable name="type_uri" select="parent::*/@targetNamespace"/>
+        <xsl:variable name="type_uri" select="ancestor-or-self::*[@targetNamespace][1]/@targetNamespace"/>
         <xsl:choose>
             <xsl:when test="not($if-prepare) and unparsed-text-available(system_cache__appinfo:element-filename.complete('build_complexType__simpleType',@name,$prefix,$type_uri)) "><!-- and $cache='read' --> <!-- concat($default_db.instance.xml,'/build_complexType/complexType-',$element-filename,'.xml') -->
                 <xsl:message>#2101 TODO hit from cache for <xsl:value-of select="system_cache__appinfo:element-filename.complete('build_complexType__simpleType',@name,$prefix,$type_uri)"/> </xsl:message>