| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- exclude-result-prefixes="xs hfp"
- version="2.0"
- xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
- xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
-
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:param name="procesy5_system_schema" select="'../default_db.instance.xml/transformed/procesy5_system_schema.xml'"/>
- <xsl:param name="procesy5_system_schema_collection_dir" select="'../'"/>
- <xsl:param name="cache" select="'refresh'"/>
- <xsl:param name="targetNamespace_DEFAULTS" select="'http://biuro.biall-net.pl/xmlschema_procesy5/default_db'"/>
- <xsl:param name="external_schema" select="'/public_html/external_schema'"/>
- <xsl:param name="external_schema_id_namespace_prefix" select="'/public_html/external_schema_id_namespace_prefix'"/>
- <xsl:param name="XMLSchema_prefix" select="'xs'"/>
- <xsl:param name="external_schema_table.path" required="yes"/>
-
- <xsl:include href="../default_db_xml_cache.public/xml-schema-primitives.xsl"/>
- <xsl:include href="system_cache__appinfo/external_schema_targetNamespace.xsl"/>
-
-
- <xsl:function name="system_cache__appinfo:document-uri_for_external_schema_id_namespace_prefix">
- <xsl:param name="system_cache__appinfo:document-uri_from_external_schema"/>
- <xsl:value-of select="substring-after(replace($system_cache__appinfo:document-uri_from_external_schema,$external_schema,$external_schema_id_namespace_prefix ), '/public_html/') "/>
- </xsl:function>
-
- <xsl:function name="system_cache__appinfo:document-uri-full_for_external_schema_id_namespace_prefix">
- <xsl:param name="system_cache__appinfo:document-uri_from_external_schema"/>
- <xsl:value-of select="replace($system_cache__appinfo:document-uri_from_external_schema,$external_schema,$external_schema_id_namespace_prefix )"/>
- </xsl:function>
-
- <xsl:function name="system_cache__appinfo:clean_object_prefix">
- <xsl:param name="name" />
- <xsl:choose>
- <xsl:when test="substring-after($name,':')">
- <xsl:value-of select="substring-after($name,':')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$name"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:function>
-
- <xsl:function name="system_cache__appinfo:get_object_prefix">
- <xsl:param name="name" />
- <xsl:choose>
- <xsl:when test="substring-before($name,':')">
- <xsl:value-of select="substring-before($name,':')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message terminate="yes">system_cache__appinfo:get_object_prefix(<xsl:value-of select="$name"/>) - parameter has no exptected prefix:object format definition! Maybe not expected schema?</xsl:message>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:function>
-
- <!-- funkcja do wyczyszczenia wyescapowenago prefixu z np. default_db__x3A__IN7_DZIENNIK_KORESP do IN7_DZIENNIK_KORESP -->
- <xsl:function name="system_cache__appinfo:clean_object_escaped_prefix">
- <xsl:param name="name" />
- </xsl:function>
-
- <!-- funkcja do ponownego zamienienia na sredniki itp z np. default_db__x3A__IN7_DZIENNIK_KORESP do IN7_DZIENNIK_KORESP -->
- <xsl:function name="system_cache__appinfo:translate_object_escaped_prefix_from_string">
- <xsl:param name="name" />
- <xsl:value-of select="replace(replace(replace(replace(replace(replace(replace(replace($name, '__x2F__', '/'), '__x3A__', ':'),'__x2D__','-'),'__x25__','%'),'__x28__','('),'__x29__',')'),'__x23__','#'),'__x2A__','*')"/>
- </xsl:function>
-
- <!-- funkcja do zamienienia na postac default_db__x3A__IN7_DZIENNIK_KORESP do IN7_DZIENNIK_KORESP -->
- <xsl:function name="system_cache__appinfo:escape_object_prefix_to_string">
- <xsl:param name="name" />
- <xsl:value-of select="replace(replace(replace(replace(replace(replace(replace(replace($name, '/', '__x2F__'), ':', '__x3A__'),'-','__x2D__'),'%','__x25__'), '\(', '__x28__'), '\)' ,'__x29__'),'#','__x23__'),'\*','__x2A__')"/>
- </xsl:function>
-
- <xsl:template name="system_cache__appinfo:prefixed_object_info">
- <xsl:param name="prefixed_object" required="yes"/>
- <xsl:variable name="prefix_token" select="tokenize(system_cache__appinfo:translate_object_escaped_prefix_from_string($prefixed_object),':')"/>
- <xsl:choose>
- <xsl:when test=" string-length($prefix_token[3]) > 0">
- <system_cache__appinfo:prefixed_object_info>
- <xsl:attribute name="prefix" select="$prefix_token[1]"/>
- <xsl:attribute name="name" select="$prefix_token[2]"/>
- <xsl:attribute name="element" select="$prefix_token[3]"/>
- </system_cache__appinfo:prefixed_object_info>
- </xsl:when>
- <xsl:otherwise>
- <system_cache__appinfo:prefixed_object_info>
- <xsl:attribute name="prefix" select="$prefix_token[1]"/>
- <xsl:attribute name="name" select="$prefix_token[2]"/>
- <xsl:attribute name="element" select="$prefix_token[2]"/>
- </system_cache__appinfo:prefixed_object_info>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- @2016-08 funkcje do wykrywania prefixow, namespace itp itd...
- <xsl:attribute name="prefix" select="$vrtfNamespaces/ns[@uri=$targetnamespace][1]/@prefix" xpath-default-namespace=""/>
- <xsl:attribute name="targetnamespace" select="$targetnamespace"/>
- <xsl:attribute name="type_79" select="$type_79"/>
- <xsl:attribute name="prefix_79" select="$prefix_79"/>
- <xsl:attribute name="type_79_nopref" select="$type_79_nopref"/>
-
- -->
- <xsl:function name="system_cache__appinfo:prefix_from_targetNamespace">
- <xsl:param name="system_cache__appinfo:vrtfNamespaces" />
- <xsl:param name="targetNamespace" />
- <xsl:value-of select="$system_cache__appinfo:vrtfNamespaces//ns[@uri=$targetNamespace][1]/@prefix" xpath-default-namespace=""/>
- </xsl:function>
- <xsl:function name="system_cache__appinfo:targetNamespace_from_prefix">
- <xsl:param name="system_cache__appinfo:vrtfNamespaces" />
- <xsl:param name="prefix" />
- <xsl:value-of select="$system_cache__appinfo:vrtfNamespaces//ns[@prefix=$prefix][1]/@uri" xpath-default-namespace=""/>
- </xsl:function>
-
-
- <xsl:function name="system_cache__appinfo:get_default_db_obj_url_table_name"><!-- @2016-10 funkcja do wykrywania nazwy tabeli dla default db, w przypadku braku zgodnosci namespace - nic nie zwraca -->
- <xsl:param name="parent_complexTypeNamespace" />
- <xsl:variable name="uri_tokens" select="tokenize($parent_complexTypeNamespace,'/')"/>
- <xsl:variable name="uri_tokens_count" select="count($uri_tokens)"/>
- <xsl:if test="$uri_tokens[($uri_tokens_count - 1)]='table' and $uri_tokens[($uri_tokens_count - 2)]='default_db' and $uri_tokens[($uri_tokens_count - 3)]='wfs'">
- <xsl:variable name="get_default_db_obj_url_table_name" select="tokenize($uri_tokens[$uri_tokens_count],'\.')"/>
- <xsl:value-of select="$get_default_db_obj_url_table_name[1]"/>
- </xsl:if>
- </xsl:function>
-
-
- <!--<xsl:function name="system_cache__appinfo:php_function_name_from_obj_with_prefix">
- <xsl:param name="object_name" required="yes"/>
- <xsl:value-of select="replace($object_name,':','__x3A__')"/>
- </xsl:function>-->
-
- <xsl:template name="main">
- <xsl:call-template name="system_cache__appinfo:get_all_xsd">
- <xsl:with-param name="path2collection" select="'../'"/>
- <xsl:with-param name="cache" select="'read'"/>
- </xsl:call-template>
- </xsl:template>
-
-
- <!-- BEGIN external schema templates -->
-
- <!-- <xsl:template match="get_all_xsd_list" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema__equals"/>
- </xsl:template>
- <xsl:template match="get_all_xsd|get_all_xsd_external_schema_id_namespace_prefix" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"/>
-
- <xsl:template match="get_all_xsd_external_schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema__equals"/>
- </xsl:template>
- -->
- <xsl:template match="system_cache__appinfo:get_all_xsd_external_schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" >
- <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" required="yes"/>
- <xsl:variable name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix">
- <var>
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/*">
- <xsl:element name="{name()}">
- <xsl:attribute name="pos" select="position()"/>
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*"/>
- </xsl:element>
- </xsl:for-each>
- </var>
- </xsl:variable>
- <system_cache__appinfo:get_all_xsd_external_schema__equals>
- <xsl:copy-of select="@*"/>
- <xsl:call-template name="system_cache__appinfo:get_all_xsd_external_schema__equals">
- <xsl:with-param name="system_cache__appinfo:get_all_xsd_external_schema" select=".[*]"/>
- <xsl:with-param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix"/>
-
- </xsl:call-template>
- <!--<system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
- <xsl:copy-of select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix"></xsl:copy-of>
- </system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>-->
- </system_cache__appinfo:get_all_xsd_external_schema__equals>
- </xsl:template>
-
- <!--<xsl:template match="schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" required="yes"/>
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema__equals">
- <xsl:with-param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/*"/>
- </xsl:apply-templates>
- </xsl:template>-->
-
- <xsl:template name="system_cache__appinfo:get_all_xsd_external_schema__equals" >
- <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema" required="yes"/>
- <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" required="yes"/>
- <!--<pre_external_schema>
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema/*">
- <xsl:element name="{name()}"><xsl:copy-of select="@*"/></xsl:element>
- </xsl:for-each>
- </pre_external_schema>
- <pre_schema_id_namespace_prefix>
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*">
- <xsl:element name="{name()}"><xsl:copy-of select="@*"/></xsl:element>
- </xsl:for-each>
- </pre_schema_id_namespace_prefix>-->
-
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema/*">
- <xsl:variable name="position" select="position()"/>
- <xsl:comment> Try position <xsl:value-of select="$position"/>;</xsl:comment>
-
- <xsl:choose>
- <!--<xsl:when test="not($position = $pos)">
- <not_pos>
- <xsl:attribute name="pos" select="$pos"/>
- <xsl:attribute name="position" select="$position"/>
- <xsl:attribute name="expected" select="local-name()"/>
- </not_pos>
- </xsl:when>-->
- <xsl:when test="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/local-name() = local-name()">
- <!--<equals>
- <xsl:attribute name="position" select="position()"/>
- <xsl:attribute name="expected" select="local-name()"/>
- <xsl:attribute name="found" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/local-name()"/>
-
- <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var[1]/name()"/>
- </equals>-->
- <!--<xsl:message>#170 comp equal <xsl:value-of select="local-name()"/> === <xsl:value-of select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix[ position() = $position]/local-name()"/></xsl:message>-->
- </xsl:when>
- <xsl:otherwise>
- <not_equals>
- <xsl:attribute name="position" select="position()"/>
- <xsl:attribute name="expected" select="local-name()"/>
- <xsl:attribute name="found" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/local-name()"/>
- <xsl:attribute name="found_id" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/@id"/>
- <xsl:attribute name="found_pos" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/@pos"/>
- <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[1]/name()"/>
- </not_equals>
- </xsl:otherwise>
- </xsl:choose>
- <!--<child>-->
- <xsl:variable name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix_new">
- <var>
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[@pos=$position]/*">
- <xsl:element name="{name()}">
- <xsl:attribute name="pos" select="position()"/>
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="*"/>
- </xsl:element>
- </xsl:for-each>
- </var>
- </xsl:variable>
- <!--<test_var_new><xsl:copy-of select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix_new"/></test_var_new>-->
- <xsl:call-template name="system_cache__appinfo:get_all_xsd_external_schema__equals">
- <xsl:with-param name="system_cache__appinfo:get_all_xsd_external_schema" select=".[*]"/>
- <xsl:with-param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix_new/.[*]"/>
- </xsl:call-template>
- <!--</child>-->
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="schema" mode="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="system_cache__appinfo:document-uri" required="yes"/>
- <xsl:variable name="targetNamespace" select="@targetNamespace"/>
- <xsl:variable name="namespaces_cur">
- <namespaces_cur>
- <xsl:for-each select="namespace::node()">
- <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
- </xsl:for-each>
- </namespaces_cur>
- </xsl:variable>
-
-
- <xsl:element name="schema" namespace="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="#default" inherit-namespaces="yes">
- <xsl:choose>
- <xsl:when test="@targetNamespace and ( not($namespaces_cur//ns[@uri=$targetNamespace]/@prefix) or $namespaces_cur//ns[@uri=$targetNamespace]/@prefix='' ) " xpath-default-namespace="">
- <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
- <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace(@targetNamespace)"/>
- <xsl:copy-of select="namespace::node()"/>
- <xsl:namespace name="p5Type" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
- <xsl:copy-of select="@targetNamespace"/>
- <xsl:attribute name="vc:minVersion" select="'1.0'"/>
- <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
- <xsl:comment>#144 when @targetNamespace exists and prefix not exists</xsl:comment>
- <xsl:comment>namespaces_cur/ns/@uri=<xsl:value-of select="$targetNamespace"/> = <xsl:value-of select="$namespaces_cur/namespaces_cur/ns[@uri=$targetNamespace]/@prefix"/> </xsl:comment>
- <xsl:comment> count: <xsl:value-of select="count($namespaces_cur/namespaces_cur/ns)"/> </xsl:comment>
- <xsl:copy-of select="*"/>
- </xsl:when>
- <xsl:when test="@targetNamespace">
- <xsl:variable name="detect_prefix" select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix" xpath-default-namespace=""/>
- <xsl:namespace name="{$detect_prefix}" select="@targetNamespace"/>
- <xsl:namespace name="p5Type" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
- <xsl:copy-of select="namespace::node()"/>
- <xsl:copy-of select="@targetNamespace"/>
- <xsl:attribute name="vc:minVersion" select="'1.0'"/>
- <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
- <xsl:comment>#147 when @targetNamespace and prefix probably exists!</xsl:comment>
- <xsl:copy-of select="*"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
- <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
- <xsl:copy-of select="namespace::node()"/>
- <xsl:namespace name="p5Type" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
- <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
- <xsl:attribute name="vc:minVersion" select="'1.0'"/>
- <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
- <xsl:message>#35 detect. targetNamespace <xsl:value-of select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/></xsl:message>
- <xsl:comment>#158 otherwise not @targetNamespace and no prefix</xsl:comment>
- <xsl:copy-of select="*"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:template>
-
-
- <xsl:template match="schema" mode="system_cache__appinfo:get_all_xsd_external_schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="system_cache__appinfo:document-uri" required="yes"/>
- <xsl:variable name="targetNamespace" select="@targetNamespace"/>
- <xsl:variable name="namespaces_cur">
- <namespaces_cur>
- <xsl:for-each select="namespace::node()">
- <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
- </xsl:for-each>
- </namespaces_cur>
- </xsl:variable>
-
-
- <xsl:element name="schema" namespace="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="#default" inherit-namespaces="yes">
- <xsl:choose>
- <xsl:when test="@targetNamespace and ( not($namespaces_cur//ns[@uri=$targetNamespace]/@prefix) or $namespaces_cur//ns[@uri=$targetNamespace]/@prefix='' ) " xpath-default-namespace="">
- <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
- <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace(@targetNamespace)"/>
- <xsl:copy-of select="namespace::node()"/>
- <xsl:copy-of select="@targetNamespace"/>
- <xsl:attribute name="vc:minVersion" select="'1.0'"/>
- <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
- <xsl:comment>#144 when @targetNamespace exists and prefix not exists</xsl:comment>
- <xsl:comment>namespaces_cur/ns/@uri=<xsl:value-of select="$targetNamespace"/> = <xsl:value-of select="$namespaces_cur/namespaces_cur/ns[@uri=$targetNamespace]/@prefix"/> </xsl:comment>
- <xsl:comment> count: <xsl:value-of select="count($namespaces_cur/namespaces_cur/ns)"/> </xsl:comment>
- <!--<xsl:for-each select="$namespaces_cur/namespaces_cur/ns">
- <xsl:comment> ns @element=<xsl:value-of select="@element"/>; @prefix=<xsl:value-of select="@prefix"/>; @uri=<xsl:value-of select="@uri"/>;</xsl:comment>
- </xsl:for-each>-->
- <!-- <xs:debug>
- <xsl:copy-of select="$namespaces_cur"/>
- </xs:debug>
- <xs:debug_filter>
- <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]"/>
- </xs:debug_filter>
- <xs:debug_filter_NS>
- <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]" xpath-default-namespace=""/>
- </xs:debug_filter_NS>-->
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
- <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
- <xsl:with-param name="detect_targetNamespace" select="@targetNamespace"/>
- <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="@targetNamespace">
- <xsl:variable name="detect_prefix" select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix" xpath-default-namespace=""/>
- <xsl:namespace name="{$detect_prefix}" select="@targetNamespace"/>
- <xsl:copy-of select="namespace::node()"/>
- <xsl:copy-of select="@targetNamespace"/>
- <xsl:attribute name="vc:minVersion" select="'1.0'"/>
- <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
- <xsl:comment>#147 when @targetNamespace and prefix probably exists!</xsl:comment>
- <!--<xsl:copy-of select="*" copy-namespaces="yes"/>-->
- <!--<xs:debug_test>
- <xsl:value-of select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix"/>
- </xs:debug_test>
- <xs:debug>
- <xsl:copy-of select="$namespaces_cur"/>
- </xs:debug>
- <xs:debug_filter>
- <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]"/>
- </xs:debug_filter>
- <xs:debug_filter_NS>
- <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]" xpath-default-namespace=""/>
- </xs:debug_filter_NS>-->
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
- <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
- <xsl:copy-of select="namespace::node()"/>
- <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
- <xsl:attribute name="vc:minVersion" select="'1.0'"/>
- <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
- <xsl:message>#35 detect. targetNamespace <xsl:value-of select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/></xsl:message>
- <xsl:comment>#158 otherwise not @targetNamespace and no prefix</xsl:comment>
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
- <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
- <xsl:with-param name="detect_targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
- <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:template>
-
-
- <xsl:template match="*" mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:element name="{$XMLSchema_prefix}:{local-name()}" namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:apply-templates select="@*" mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>
- </xsl:element>
- </xsl:template>
-
- <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix" match="@type|@base">
- <!-- sa bledy ze schematami z prefix xsd... -->
- <xsl:choose>
- <xsl:when test="contains(.,'xsd:')">
- <xsl:attribute name="{name()}" select="concat($XMLSchema_prefix,':', system_cache__appinfo:clean_object_prefix(.))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="{name()}" select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix" match="@*">
- <xsl:attribute name="{name()}" select="."/>
- </xsl:template>
-
- <xsl:template match="*" mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="detect_prefix" required="yes"/>
- <xsl:param name="detect_targetNamespace" required="yes"/>
- <xsl:param name="namespaces_cur" required="yes"/>
- <xsl:element name="{$XMLSchema_prefix}:{local-name()}" namespace="http://www.w3.org/2001/XMLSchema">
- <!--<xsl:attribute name="test_prefix" select="system_cache__appinfo:prefix_from_targetNamespace($namespaces_cur,'http://www.w3.org/2001/XMLSchema')"/>-->
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" select="@*">
- <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
- <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
- </xsl:apply-templates>
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
- <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
- <xsl:with-param name="detect_targetNamespace" select="$detect_targetNamespace"/>
- <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
- </xsl:apply-templates>
- </xsl:element>
- </xsl:template>
-
-
- <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" match="@type|@base">
- <!-- sa bledy ze schematami z prefix xsd... -->
- <xsl:param name="namespaces_cur" required="yes"/>
- <xsl:param name="detect_prefix" required="yes"/>
- <xsl:choose>
- <!--<xsl:when test="contains(.,'xsd:')">
- <xsl:attribute name="{name()}" select="concat($XMLSchema_prefix,':', system_cache__appinfo:clean_object_prefix(.))"/>
- </xsl:when>-->
- <xsl:when test="not(contains(.,':'))">
- <xsl:attribute name="{name()}" select="concat($detect_prefix,':',.)"/>
- </xsl:when>
- <xsl:when test="system_cache__appinfo:prefix_from_targetNamespace($namespaces_cur,'http://www.w3.org/2001/XMLSchema')=system_cache__appinfo:get_object_prefix(.)">
- <!--<xsl:message terminate="yes">#281 - wykryte ze jest to type XSD <xsl:value-of select="."/></xsl:message>-->
- <xsl:attribute name="{name()}" select="concat($XMLSchema_prefix,':', system_cache__appinfo:clean_object_prefix(.))"/>
- </xsl:when>
- <xsl:when test="contains(.,':')">
- <xsl:copy-of select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message> #285 test : <xsl:value-of select="system_cache__appinfo:prefix_from_targetNamespace($namespaces_cur,'http://www.w3.org/2001/XMLSchema')"/> = <xsl:value-of select="system_cache__appinfo:get_object_prefix(.)"/> (<xsl:value-of select="."/>) ?</xsl:message>
- <xsl:attribute name="{name()}" select="concat($detect_prefix,':',.)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" match="@ref">
- <xsl:param name="namespaces_cur" required="yes"/>
- <xsl:param name="detect_prefix" required="yes"/>
- <xsl:attribute name="{name()}" select="concat($detect_prefix,':',.)"/>
- </xsl:template>
-
- <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" match="@*">
- <xsl:param name="namespaces_cur" required="yes"/>
- <xsl:attribute name="{name()}" select="."/>
- </xsl:template>
-
-
-
- <!-- EOF external schema templates -->
-
-
- <xsl:template name="system_cache__appinfo:get_all_xsd.verify_unique_id">
- <system_cache__appinfo:get_all_xsd.verify_unique_id>
- <xsl:variable name="system_cache__appinfo:get_all_xsd" select="doc($procesy5_system_schema)"/>
-
-
-
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd//schema[ not(@targetNamespace='http://www.w3.org/2001/XMLSchema') and not(@targetNamespace='http://biuro.biall-net.pl/p5/schema/types')]//*[@id and position() < 100] " xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:message>#486 testing <xsl:value-of select="name()"/> and @id=<xsl:value-of select="@id"/></xsl:message>
- <xsl:choose>
- <xsl:when test="count($system_cache__appinfo:get_all_xsd//*[@id = current()/@id]) > 1">
- <xsl:message terminate="yes">#489 error duplicate @id for <xsl:value-of select="@id"/> - element <xsl:value-of select="name()"/>/<xsl:value-of select="@name"/>
-
- </xsl:message>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </system_cache__appinfo:get_all_xsd.verify_unique_id>
- </xsl:template>
-
- <xsl:template name="system_cache__appinfo:get_all_xsd">
- <xsl:param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
- <xsl:param name="get_system_schemas"/>
- <xsl:param name="cache" select="$cache"/>
- <xsl:variable name="element-filename" select="'procesy5_system_schema'"/>
- <xsl:choose>
- <xsl:when test="unparsed-text-available(concat('../default_db.instance.xml/transformed/',$element-filename,'.xml')) and $cache='read'">
- <xsl:copy-of select="doc(concat('../default_db.instance.xml/transformed/',$element-filename,'.xml'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="path">
- <xsl:value-of select="concat($path2collection,'?select=*.(xsd);recurse=yes;on-error=warning')"/>
- </xsl:variable>
- <xsl:variable name="docs" select="collection($path)"/>
- <xsl:variable name="procesy5_system_schema">
- <system_cache__appinfo:get_all_xsd_list>
- <xsl:for-each select="$docs">
- <xsl:message> get_all_xsd przetwarzam plik <xsl:value-of select="document-uri(/)"/></xsl:message>
- <xsl:choose>
- <xsl:when test="contains(document-uri(/),'/ant-object/')">
- <xsl:message>#519 ignored /ant-object for <xsl:value-of select="document-uri(/)"/>"/> ;</xsl:message>
- </xsl:when>
- <xsl:when test=" contains(document-uri(/), concat($external_schema,'/'))">
- <xsl:comment>#145 Ignored /public_html/external_schema <xsl:value-of select="document-uri(/)"/></xsl:comment>
- <system_cache__appinfo:get_all_xsd_external_schema>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="system_cache__appinfo:document-uri_for_external_schema_id_namespace_prefix(document-uri(/))"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="system_cache__appinfo:document-uri-full_for_external_schema_id_namespace_prefix(document-uri(/))"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-orig" select="substring-after(document-uri(/), $external_schema)"/>
- <!--<xsl:attribute name="system_cache__appinfo:document-uri-full-orig" select="document-uri(/)"/>-->
- <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:element name="{name()}">
- <xsl:for-each select="@*">
- <xsl:attribute name="{name()}" select="."/>
- <xsl:copy-of select="child::node()"/>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>-->
- <!--<xsl:copy-of select="/"/>-->
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema" select=".">
- <xsl:with-param name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
- </xsl:apply-templates>
- </system_cache__appinfo:get_all_xsd_external_schema>
- </xsl:when>
- <xsl:when test=" contains(document-uri(/), concat($external_schema_id_namespace_prefix,'/'))">
- <xsl:comment>#248 Ignored /public_html/external_schema_id_namespace_prefix <xsl:value-of select="document-uri(/)"/></xsl:comment>
- <system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-orig" select="substring-after(document-uri(/), $external_schema_id_namespace_prefix)"/>
- <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:element name="{name()}">
- <xsl:for-each select="@*">
- <xsl:attribute name="{name()}" select="."/>
- <xsl:copy-of select="child::node()"/>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>-->
- <!--<xsl:copy-of select="/"/>-->
- <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" select=".">
- <xsl:with-param name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
- </xsl:apply-templates>
- </system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
- </xsl:when>
- <xsl:otherwise>
- <system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:element name="{name()}">
- <xsl:for-each select="@*">
- <xsl:attribute name="{name()}" select="."/>
- <xsl:copy-of select="child::node()"/>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>-->
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <!-- -->
- <xsl:message> schemat dla XML primitives <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:message>
- <system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:copy-of select="$system_cache__appinfo:primitives.xsd"/>
- </system_cache__appinfo:get_all_xsd>
- <xsl:message> schemat dla XML primitives/derived <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:message>
- <system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:copy-of select="$system_cache__appinfo:derived.xsd"/>
- </system_cache__appinfo:get_all_xsd>
- <system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:copy-of select="$system_cache__appinfo:XMLSchema11.xsd"/>
- </system_cache__appinfo:get_all_xsd>
- <system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
- <xsl:copy-of select="$system_cache__appinfo:builtintypes.xsd"/>
- </system_cache__appinfo:get_all_xsd>
- <system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
- <xsl:copy-of select="$system_cache__appinfo:p5Type.xsd"/>
- </system_cache__appinfo:get_all_xsd>
- </system_cache__appinfo:get_all_xsd_list>
- </xsl:variable>
- <!--<xsl:result-document href="{concat('../default_db.instance.xml/transformed/',$element-filename,'.xml')}">
- <xsl:copy-of select="$procesy5_system_schema"/>
- </xsl:result-document>-->
- <xsl:copy-of select="$procesy5_system_schema"></xsl:copy-of>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!--TODO DISABLED TEMPORARY - IF IS USED? <xsl:template name="system_cache__appinfo:vrtfNamespaces"><!-\- consider namespaces for get_all_xsd_external_schema -\->
- <xsl:variable name="procesy5_system_schema">
- <xsl:call-template name="system_cache__appinfo:get_all_xsd">
- <xsl:with-param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
- <xsl:with-param name="cache" select="'read'"/>
- </xsl:call-template>
- </xsl:variable>
- <system_cache__appinfo:vrtfNamespaces>
- <xsl:for-each select="$procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/system_cache__appinfo:get_all_xsd/schema/namespace::node()"
- xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
- </xsl:for-each>
- </system_cache__appinfo:vrtfNamespaces>
- </xsl:template>-->
-
- <!--<xsl:template name="system_cache__appinfo:vrtfNamespaces_external_schema">
- <xsl:variable name="procesy5_system_schema">
- <xsl:call-template name="system_cache__appinfo:get_all_xsd">
- <xsl:with-param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
- <xsl:with-param name="cache" select="'read'"/>
- </xsl:call-template>
- </xsl:variable>
- <system_cache__appinfo:vrtfNamespaces_external_schema>
- <xsl:for-each select="$procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/system_cache__appinfo:get_all_xsd_external_schema/schema/namespace::node()"
- xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
- </xsl:for-each>
- </system_cache__appinfo:vrtfNamespaces_external_schema>
- </xsl:template>-->
-
- <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:vrtfNamespaces">
- <system_cache__appinfo:vrtfNamespaces>
- <xsl:for-each select="//(system_cache__appinfo:get_all_xsd|system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix)/schema/namespace::node()"
- xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <ns element="{name(..)}" prefix="{name()}" uri="{.}" system_cache__appinfo:document-uri="{../@system_cache__appinfo:document-uri}"/>
- </xsl:for-each>
- </system_cache__appinfo:vrtfNamespaces>
- </xsl:template>
-
-
- <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:element_complexType">
- <xsl:param name="targetNamespace" select="$targetNamespace_DEFAULTS"/>
- <system_cache__appinfo:element_complexType>
- <xsl:for-each select="get_all_xsd[ substring-before(@system_cache__appinfo:document-uri,'/')!='default_db_xml_cache' and substring-before(@system_cache__appinfo:document-uri,'/')!='default_db_xml_cache.public']" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd">
- <xsl:variable name="get_all_xsd_236" select="."/>
- <xsl:comment>
- 246:detect_resource_type, przetwarzam schemat:<xsl:value-of select="@system_cache__appinfo:document-uri"/>; $targetNamespace:<xsl:value-of select="$targetNamespace"/>;
- @targetNamespace:<xsl:value-of select="schema/@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>;</xsl:comment>
- <xsl:variable name="schema_node_144" select="."/>
- <xsl:for-each select="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"><!--[ @targetNamespace != $targetNamespace ] namespace::node() = $targetNamespace and @targetNamespace='moj_ogrodek' -->
- <xsl:message>239::detect_resource_type przetwarzam schemat:@targetNamespace:<xsl:value-of select="@targetNamespace"/>;</xsl:message>
- <xsl:variable name="prefix_83" select="namespace::node()[. = $targetNamespace]/name()"/>
- <xsl:variable name="targetNamespace_134" select="@targetNamespace"/>
- <xsl:variable name="prefix_134" select="namespace::node()[. = $targetNamespace_134][1]/name()"/><!-- np. test_objects -->
- <xsl:if test="not(@targetNamespace) or not($prefix_134) ">
- <xsl:message terminate="yes">#394 ERROR - schema error - set @targetNamespace and prefix for shema file:<xsl:value-of select="../@system_cache__appinfo:document-uri-full"/> ; </xsl:message>
- </xsl:if>
- <xsl:if test="count(.//node()[(local-name()='element' or local-name()='complexType' or local-name()='sequence' or local-name()='choice' or local-name()='complexContent' or local-name()='extension' ) and not(@id)])=0">
- <xsl:for-each select="(element|complexType)" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"><!-- dla ograniczenia mozna [$prefix_134='test_objects']-->
- <xsl:variable name="complexType_or_element_name186">
- <xsl:choose>
- <xsl:when test="local-name()='element'"><xsl:value-of select="@name"/></xsl:when>
- <xsl:when test="local-name()='complexType'"><xsl:value-of select="@name"/></xsl:when>
- <xsl:otherwise><xsl:message terminate="yes">#391 it should work only for element or complexType</xsl:message></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:comment>157: buduje plaski obiekt/mape przetwarzania w celu przeszukania relacji @id:<xsl:value-of select="@id"/>; targetNamespace:<xsl:value-of select="$prefix_134"/>; $complexType_or_element_name186:<xsl:value-of select="$complexType_or_element_name186"/>; name:<xsl:value-of select="@name"/>; namespace-uri-for-prefix:<xsl:value-of select="namespace-uri-for-prefix($prefix_134,.)"/></xsl:comment>
- <xsl:message>157: buduje plaski obiekt/mape przetwarzania w celu przeszukania relacji @id:<xsl:value-of select="@id"/>; targetNamespace:<xsl:value-of select="$prefix_134"/>; $complexType_or_element_name186:<xsl:value-of select="$complexType_or_element_name186"/>; name:<xsl:value-of select="@name"/>; namespace-uri-for-prefix:<xsl:value-of select="namespace-uri-for-prefix($prefix_134,.)"/></xsl:message>
- <xsl:choose>
- <xsl:when test="local-name()='element'">
- <build_cache name="build_element">
- <with-param name="element" select="{$prefix_134}:{$complexType_or_element_name186}"/>
- </build_cache>
- </xsl:when>
- <xsl:when test="local-name()='complexType'">
- <build_cache name="build_complexType">
- <with-param name="complexType"
- select="{$prefix_134}:{$complexType_or_element_name186}"/>
- </build_cache>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </xsl:if>
- </xsl:for-each>
- </xsl:for-each>
- </system_cache__appinfo:element_complexType>
- </xsl:template>
-
-
- <!-- do aktualizowania pozycji w schemache-->
- <xsl:template name="system_cache__appinfo:position">
- <xsl:param name="xml"/>
- <xsl:for-each select="$xml/*">
- <xsl:if test="name()">
- <xsl:element name="{name()}">
- <xsl:attribute name="system_cache__appinfo:position" select="position()"/>
- <xsl:apply-templates mode="system_cache__appinfo:position" select="@*"/>
- <xsl:call-template name="system_cache__appinfo:position">
- <xsl:with-param name="xml" select="."/>
- </xsl:call-template>
- </xsl:element>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="@*" mode="system_cache__appinfo:position">
- <xsl:attribute name="{name()}" select="."/>
- </xsl:template>
- <xsl:template match="text()" mode="system_cache__appinfo:position"/>
- <xsl:template match="comment()" mode="system_cache__appinfo:position"/>
-
-
-
- </xsl:stylesheet>
|