|
|
@@ -18,7 +18,7 @@
|
|
|
|
|
|
|
|
|
<xsl:output indent="yes"/>
|
|
|
- <xsl:param name="debug_level_param"/>
|
|
|
+ <xsl:param name="debug_level_param" /><!-- select="4" -->
|
|
|
|
|
|
<xsl:param name="default_db.instance.xml" required="yes"/>
|
|
|
<xsl:param name="default_db.instance.xml.symlink" required="yes"/>
|
|
|
@@ -245,7 +245,7 @@
|
|
|
<xsl:param name="namespace_uri_param" required="no" select="$system_cache__appinfo:targetNamespace"/> <!-- parametr powinny nadpisywac wzajemnie template i zmieniac sie po @type,@base -->
|
|
|
<xsl:param name="prefix" required="no"/> <!-- parametr prefixu powinny nadpisywac wzajemnie template i zmieniac sie po @type,@base -->
|
|
|
<xsl:param name="path"/>
|
|
|
- <xsl:if test="$debug_level>3 or 1=1"><xsl:message>86:system_cache__appinfo:build_element run for parms: $element:"<xsl:value-of select="$element"/>"; $namespace_uri_param:"<xsl:value-of select="$namespace_uri_param"/>"; $prefix:"<xsl:value-of select="$prefix"/>";</xsl:message></xsl:if>
|
|
|
+ <xsl:if test="$debug_level>3 or 1=1"><xsl:message>86-248:system_cache__appinfo:build_element run for parms: $element:"<xsl:value-of select="$element"/>"; $namespace_uri_param:"<xsl:value-of select="$namespace_uri_param"/>"; $prefix:"<xsl:value-of select="$prefix"/>";</xsl:message></xsl:if>
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="not($namespace_uri_param) and not($prefix) and not(substring-before($element,':'))">
|
|
|
<xsl:message terminate="yes">90:system_cache__appinfo:build_element required params are missing: ($targetNamespace or $prefix) ; </xsl:message>
|
|
|
@@ -260,7 +260,7 @@
|
|
|
<xsl:variable name="namespace_uri_param">
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="$namespace_uri_param"><xsl:value-of select="$namespace_uri_param"/>
|
|
|
- <xsl:message>#90-263 ($namespace_uri_param set to="<xsl:value-of select="$namespace_uri_param"/>")</xsl:message>
|
|
|
+ <xsl:message>#90-263 ($namespace_uri_param set to="<xsl:value-of select="$namespace_uri_param"/>") ; ($prefix set to "<xsl:value-of select="$prefix"/>"); </xsl:message>
|
|
|
</xsl:when>
|
|
|
<xsl:otherwise>
|
|
|
|
|
|
@@ -353,11 +353,13 @@
|
|
|
<xsl:copy-of select="@*"/>
|
|
|
<xsl:choose>
|
|
|
<xsl:when test="@name='build_complexType'">
|
|
|
+ <xsl:message>#356; call-template(name="system_cache__appinfo:build_complexType_cache");</xsl:message>
|
|
|
<xsl:call-template name="system_cache__appinfo:build_complexType_cache">
|
|
|
<xsl:with-param name="complexType" select="with-param/@select"/>
|
|
|
</xsl:call-template>
|
|
|
</xsl:when>
|
|
|
<xsl:when test="@name='build_element'">
|
|
|
+ <xsl:message>#356-362; call-template(name="system_cache__appinfo:build_complexType_cache");</xsl:message>
|
|
|
<xsl:call-template name="system_cache__appinfo:build_element_cache">
|
|
|
<xsl:with-param name="element" select="with-param/@select"/>
|
|
|
</xsl:call-template>
|
|
|
@@ -1692,7 +1694,7 @@
|
|
|
<xsl:variable name="path" select="system_cache__appinfo:build_complexType_loop_path($path,@id,local-name(),$prefix,system_cache__appinfo:clean_object_prefix(@name))"/>
|
|
|
<!--<xsl:variable name="xpath_local" select="concat($prefix,':',@name)"/>--> <!-- tworzymy tutaj poczatek lokalnej sciezki XPATH - todo chyba powinna zaczac sie z elementu, a wczesniej z @type,@ref,@base? TODO-->
|
|
|
<xsl:if test="$debug_level>3"><xsl:message>
|
|
|
- 72b:odpalilem complexType template $path:<xsl:value-of select="$path"/>;
|
|
|
+ 72b:odpalilem complexType template $path:<xsl:value-of select="$path"/>; ($loop="<xsl:value-of select="$loop"/>");
|
|
|
</xsl:message>
|
|
|
<xsl:comment>72c:odpalilem complexType template; $path:<xsl:value-of select="$path"/>; </xsl:comment></xsl:if>
|
|
|
<xsl:element name="{name()}">
|
|
|
@@ -2257,13 +2259,15 @@
|
|
|
<xsl:param name="restriction_base"/>
|
|
|
<xsl:param name="xpath_local"/>
|
|
|
<xsl:param name="restriction_path"/>
|
|
|
+ <xsl:param name="loop"/>
|
|
|
<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>
|
|
|
+ <xsl:comment>209A: simpleType applied! system_cache__appinfo:root_element_in_schema:<xsl:value-of select="$system_cache__appinfo:root_element_in_schema"/>; ($loop="<xsl:value-of select="$loop"/>") </xsl:comment>
|
|
|
+ <xsl:message>209A: simpleType applied! system_cache__appinfo:root_element_in_schema:<xsl:value-of select="$system_cache__appinfo:root_element_in_schema"/>; ($loop="<xsl:value-of select="$loop"/>") </xsl:message>
|
|
|
<!-- TODO @2015-11-04 TODO REM REM!!!-->
|
|
|
<!-- <xsl:choose>
|
|
|
<xsl:when test="$system_cache__appinfo:root_element_in_schema='true'">-->
|
|
|
@@ -2313,9 +2317,10 @@
|
|
|
<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="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-TEST hit from cache for <xsl:value-of select="system_cache__appinfo:element-filename.complete('build_complexType__simpleType',@name,$prefix,$type_uri)"/> </xsl:message>
|
|
|
+ <xsl:message>#2101 TODO-TEST hit from cache for <xsl:value-of select="system_cache__appinfo:element-filename.complete('build_complexType__simpleType',@name,$prefix,$type_uri)"/>; system_cache__appinfo:complex_path_detect_loop="<xsl:value-of select="system_cache__appinfo:complex_path_detect_loop($path,@id,'simpleType',$prefix,@name)='loop'"/>"; </xsl:message>
|
|
|
<xsl:copy-of select="doc(system_cache__appinfo:element-filename('build_complexType__simpleType',@name,$prefix,$type_uri))"/>
|
|
|
</xsl:when>
|
|
|
<xsl:otherwise>
|
|
|
@@ -2339,7 +2344,7 @@
|
|
|
<xsl:otherwise><xsl:value-of select="$procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/(system_cache__appinfo:get_all_xsd|system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix)/schema[@targetNamespace=$type_uri and simpleType[@name=$name] ]/namespace::node()[.=$type_uri]/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
</xsl:variable>
|
|
|
- <xsl:message>#2101B TODO save to ($prefix="<xsl:value-of select="$prefix"/>") <xsl:value-of select="system_cache__appinfo:element-filename.symlink('build_complexType__simpleType',@name,$prefix,$type_uri)"/>; ($name="<xsl:value-of select="$name"/>")</xsl:message>
|
|
|
+ <xsl:message>#2101B TODO save to ($prefix="<xsl:value-of select="$prefix"/>") <xsl:value-of select="system_cache__appinfo:element-filename.symlink('build_complexType__simpleType',@name,$prefix,$type_uri)"/>; ($name="<xsl:value-of select="$name"/>"); ($path="<xsl:value-of select="$path"/>");</xsl:message>
|
|
|
</xsl:otherwise>
|
|
|
</xsl:choose>
|
|
|
<xsl:comment>209: simpleType applied! system_cache__appinfo:root_element_in_schema:<xsl:value-of select="$system_cache__appinfo:root_element_in_schema"/>; if-prepare(<xsl:value-of select="$if-prepare"/>)</xsl:comment>
|
|
|
@@ -3278,7 +3283,7 @@
|
|
|
<xsl:with-param name="recurse" select="0"/>
|
|
|
</xsl:apply-templates>
|
|
|
</xsl:when>
|
|
|
- <xsl:when test="1=1 and number($recurse) < 2 and not($cache='refresh') and not($type_uri='http://www.w3.org/2001/XMLSchema') and string-length($path) < 300 and not($procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/(system_cache__appinfo:get_all_xsd|system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix)/schema[@targetNamespace = $type_uri]/simpleType[@name = system_cache__appinfo:clean_object_prefix($type)]) " xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
|
|
|
+ <xsl:when test="1=1 and number($recurse) < 2 and not($cache='refresh') and not($type_uri='http://www.w3.org/2001/XMLSchema') and string-length($path) < 200 and not($procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/(system_cache__appinfo:get_all_xsd|system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix)/schema[@targetNamespace = $type_uri]/simpleType[@name = system_cache__appinfo:clean_object_prefix($type)]) " xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
|
|
|
<xsl:message>#2439-B $recurse=<xsl:value-of select="$recurse"/> string-length($path)=<xsl:value-of select="string-length($path)"/>; calling recurs cache <xsl:value-of select="$element-filename"/>; for @id=<xsl:value-of select=".././@id"/>; $type:<xsl:value-of select="$type"/> at path <xsl:value-of select="$path"/>;</xsl:message>
|
|
|
|
|
|
<xsl:variable name="build-complexType.cache">
|
|
|
@@ -3553,7 +3558,7 @@
|
|
|
</xsl:variable>
|
|
|
<xsl:if test="string-length($prefix) < 1"><xsl:message terminate="yes">#2616 error empty prefix for @id=<xsl:value-of select=".././@id"/> </xsl:message></xsl:if>
|
|
|
<xsl:if test="count($procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/(system_cache__appinfo:get_all_xsd|system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix)/schema[@targetNamespace=$type_uri]/namespace::node()[.=$type_uri]/name()) > 1">
|
|
|
- <xsl:message terminate="no">#1517A ERROR - probably You have wrong schema .xsd files with twice set targetnamespace for $prefix:"<xsl:value-of select="$prefix"/>"; - it could be OK for importing external schemas for local default_db prefix ($type="<xsl:value-of select="$type"/>") ; (@targetNamespace=$type_uri="<xsl:value-of select="$type_uri"/>")</xsl:message>
|
|
|
+ <xsl:message terminate="no">#1517A WARNING - probably You have wrong schema .xsd files with twice set targetnamespace for $prefix:"<xsl:value-of select="$prefix"/>"; - it could be OK for importing external schemas for local default_db prefix ($type="<xsl:value-of select="$type"/>") ; (@targetNamespace=$type_uri="<xsl:value-of select="$type_uri"/>")</xsl:message>
|
|
|
</xsl:if>
|
|
|
<xsl:if test="substring-before($prefix,' ')">
|
|
|
<xsl:message terminate="yes">#1517B ERROR - probably You have wrong schema .xsd files with twice set targetnamespace for $prefix:"<xsl:value-of select="$prefix"/>"; $type_uri = <xsl:value-of select="$type_uri"/>; $targetNamespace = <xsl:value-of select="$targetNamespace"/>; @ref=<xsl:value-of select="."/>; @id= <xsl:value-of select="../@id"/>; ($type="<xsl:value-of select="$type"/>")</xsl:message>
|