| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129 |
- <?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:p5_tr_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd"
- xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
- xmlns:system_cache__resources_tree_generate_xsl_required_occurs_raport="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/resources_tree_generate_xsl_require_occurs_raport"
- xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- xmlns:p5opr="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd"
- xmlns:p5_simpleSchema_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/p5_simpleSchema_map.xsd"
- xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
- xmlns:ant-object="http://biuro.biall-net.pl/xmlschema_procesy5/ant-object/ant-object.xsd"
- xmlns:p5ant-interface="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd"
- >
-
-
-
- <xsl:import href="system_cache__appinfo/vrtfNamespaces.xsl"/>
- <xsl:import href="p5_tr_map/element-filename.xsl"/>
- <xsl:import href="object_parent_relations/element-filename.xsl"/> <!-- param name="p5opr:detect_objects_parent_relations.local" required="yes" -->
- <xsl:import href="system_cache__appinfo/basedir.xsl"/>
- <xsl:include href="p5_simpleSchema_map/element-filename.xsl"/>
-
- <xsl:include href="../ant-object/default_db.ant-object.basedir.xsl"/>
- <xsl:include href="../ant-object/ant-object.xsl"/>
-
- <!--<xsl:import href="system_cache__appinfo/element-filename.xsl"/>-->
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
-
-
- <xsl:param name="vc:minVersion" select="'1.1'" />
- <xsl:param name="vc:maxVersion"/>
- <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="'read'"/>
- <xsl:param name="targetNamespace_DEFAULTS" select="'http://biuro.biall-net.pl/xmlschema_procesy5/default_db'"/>
- <xsl:param name="external_schema" required="yes" /> <!-- 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:param name="default_db.dir" required="yes" /> <!-- select="'/public_html/default_db/'" -->
- <xsl:param name="default_db_xml_cache.public" required="yes"/><!-- select="'/public_html/default_db_xml_cache.public/'" -->
-
- <xsl:param name="targetNamespace_DEFAULTS_prefix" select="'default_db'"/>
-
- <xsl:param name="WPS_Functions" required="yes" /><!-- select="'public_html/WPS_Functions/'" -->
- <xsl:param name="new-schema-with-ID-to-move-and-rename-to-xsd" select="'/new-schema-with-ID-to-move-and-rename-to-xsd'"/>
- <xsl:param name="default_db.instance.xml" required="yes"/> <!-- todo better always include get_all_xsd -->
- <xsl:param name="p5build_SE.INSTALL_ROOT.repository.symlink" select="'/repository.symlink/'"/>
- <xsl:param name="p5Type.basedir" required="yes"/> <!-- select="'public_html/Types/'" -->
-
- <xsl:include href="../default_db_xml_cache.public/xml-schema-primitives.xsl"/>
- <xsl:include href="system_cache__appinfo/external_schema_targetNamespace.xsl"/>
- <xsl:include href="system_cache__appinfo/functions.xsl"/>
- <xsl:include href="system_cache__resources_tree_generate_xsl_required_occurs_raport/element-filename.xsl"/>
- <xsl:include href="system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_resource_type.local.xsl"/>
-
- <xsl:include href="system_cache__appinfo/element-filename.xsl"/>
-
-
- <xsl:attribute-set name="p5ant-interface:xslt.param.get_all_xsd_list">
- <xsl:attribute name="default_db.ant-object.basedir" select="$default_db.ant-object.basedir"/>
- </xsl:attribute-set>
-
- <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="complexType" mode="system_cache__appinfo:get_all_xsd_default_db__equals" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
- <xsl:param name="system_cache__appinfo:get_all_xsd.row" required="yes"/>
- <xsl:if test="not($system_cache__appinfo:get_all_xsd.row/*)">
- <not_equals>
- <xsl:attribute name="empty" select="@name"/>
- </not_equals>
- </xsl:if>
- <xsl:variable name="system_cache__appinfo:get_all_xsd.row">
- <var>
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd.row/*">
- <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_default_db__equals>
- <xsl:copy-of select="@*"/>
- <xsl:call-template name="system_cache__appinfo:get_all_xsd_default_db__equals">
- <xsl:with-param name="system_cache__appinfo:get_all_xsd_default_db" select=".[*]"/>
- <xsl:with-param name="system_cache__appinfo:get_all_xsd.row" select="$system_cache__appinfo:get_all_xsd.row"/>
- </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_default_db__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:message>#111 @name=<xsl:value-of select="@name"/>; name()=<xsl:value-of select="name()"/></xsl:message>
- <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_default_db__equals" >
- <xsl:param name="system_cache__appinfo:get_all_xsd_default_db" required="yes"/>
- <xsl:param name="system_cache__appinfo:get_all_xsd.row" 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_default_db/*">
- <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.row/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.row/var/*[ @pos = $position]/local-name()"/>
- <xsl:attribute name="found.name" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@name"/>
-
- <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd.row/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="expected.name" select="@name"/>
- <xsl:attribute name="found" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/local-name()"/>
- <xsl:attribute name="found.name" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@name"/>
- <xsl:attribute name="found_id" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@id"/>
- <xsl:attribute name="found_pos" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@pos"/>
- <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd.row/var/*[1]/name()"/>
- </not_equals>
- </xsl:otherwise>
- </xsl:choose>
-
- <!--<child>-->
- <xsl:variable name="system_cache__appinfo:get_all_xsd_default_db_new">
- <var>
- <xsl:for-each select="$system_cache__appinfo:get_all_xsd.row/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_default_db__equals">
- <xsl:with-param name="system_cache__appinfo:get_all_xsd_default_db" select=".[*]"/>
- <xsl:with-param name="system_cache__appinfo:get_all_xsd.row" select="$system_cache__appinfo:get_all_xsd_default_db_new/.[*]"/>
- </xsl:call-template>
- <!--</child>-->
-
- </xsl:for-each>
- </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:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
- <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
-
- <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:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
- <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
- <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:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
- <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
- <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.1'"/>
- <!--<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:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
- <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
- <!--<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=fail;xinclude=no')"/>
- </xsl:variable>
- <xsl:variable name="docs" select="collection($path)"/>
- <xsl:variable name="procesy5_system_schema">
- <system_cache__appinfo:get_all_xsd_list xsl:use-attribute-sets="p5ant-interface:xslt.param.get_all_xsd_list"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd ../../default_db_xml_cache.public/system_cache__appinfo/procesy5_system_schema.xsd">
-
- <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(/),$p5build_SE.INSTALL_ROOT.repository.symlink)">
- <xsl:message>#555 ignored /$repository.symlink for <xsl:value-of select="document-uri(/)"/>"/> ;</xsl:message>
- </xsl:when>
- <xsl:when test="contains(document-uri(/),'/ant-object/') and ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))">
- <xsl:message>#519 NOT default_db ignored TESTING /ant-object for <xsl:value-of select="document-uri(/)"/>"/> ;</xsl:message>
- <xsl:comment>#519 NOT default_db ignored TESTING /ant-object test:
- <xsl:value-of select="ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))"/>
- </xsl:comment>
- <system_cache__appinfo:get_all_xsd debug="@2019-08 problem if should be _default_db"><!-- _default_db -->
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $basedir)"/><!-- $default_db.ant-object.basedir -->
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:call-template name="ant-object:location__x3A__default_db.validate">
- <xsl:with-param name="document-uri" select="document-uri(/)"/>
- <xsl:with-param name="default_db.ant-object.basedir" select="$default_db.ant-object.basedir"/>
- </xsl:call-template>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd>
- </xsl:when>
-
- <xsl:when test="contains(document-uri(/),'/ant-object/') and not(ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/)))">
- <xsl:message>#519B default_db ignored TESTING /ant-object for <xsl:value-of select="document-uri(/)"/>"/> ;</xsl:message>
- <xsl:comment>#519B default_db ignored TESTING /ant-object test:
- <xsl:value-of select="ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))"/>
- </xsl:comment>
-
- </xsl:when>
-
- <xsl:when test="contains(document-uri(/),$new-schema-with-ID-to-move-and-rename-to-xsd)">
- <xsl:message>#638 ignored /ant-object for <xsl:value-of select="document-uri(/)"/>;</xsl:message>
- </xsl:when>
- <xsl:when test="contains(document-uri(/),'Types/types.xsd')">
- <xsl:message>#564 ignored targetNamespace="http://biuro.biall-net.pl/p5/schema/types" for <xsl:value-of select="document-uri(/)"/>; - it is maintained by xsl file config fixed </xsl:message>
- </xsl:when>
-
- <xsl:when test="contains(document-uri(/),'dita-ot/') and contains(document-uri(/),'/plugins/' )">
- <xsl:message>#569 ignored contains(document-uri(/),'dita-ot/') and contains(document-uri(/),'/plugins/' ) for <xsl:value-of select="document-uri(/)"/>; - TODO MAINTAIN no targetnamespace </xsl:message>
- </xsl:when>
-
- <xsl:when test="contains(document-uri(/),'/dita_kosztorys_projektowy/') ">
- <xsl:message>#573 ignored contains(document-uri(/),'dita_kosztorys_projektowy') for <xsl:value-of select="document-uri(/)"/>; - TODO MAINTAIN no targetnamespace </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(/), $external_schema_id_namespace_prefix)"/>
- </xsl:apply-templates>
- </system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
- </xsl:when>
- <xsl:when test=" contains(document-uri(/), $default_db_xml_cache.public)">
- <xsl:comment>#619 NOT ignored schema by contains(document-uri(/), $default_db_xml_cache.public) == (<xsl:value-of select="$default_db_xml_cache.public"/>) (<xsl:value-of select="document-uri(/)"/>)</xsl:comment>
- <system_cache__appinfo:get_all_xsd.default_db_xml_cache.public>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db_xml_cache.public)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd.default_db_xml_cache.public>
- </xsl:when>
-
- <!--<xsl:when test=" contains(document-uri(/), concat($default_db.dir,'/Types')) ">
- <xsl:comment>#662T NOT ignored schema by contains(document-uri(/), $default_db.dir/Types) == (<xsl:value-of select="$default_db.dir"/> + /Types) (<xsl:value-of select="document-uri(/)"/>)</xsl:comment>
- <system_cache__appinfo:get_all_xsd_default_db>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd_default_db>
- </xsl:when>-->
-
- <xsl:when test=" contains(document-uri(/), concat($default_db.dir,'/')) ">
- <xsl:comment>#617A NOT ignored schema by contains(document-uri(/), $default_db.dir) == (<xsl:value-of select="$default_db.dir"/> + /) (<xsl:value-of select="document-uri(/)"/>)</xsl:comment>
- <system_cache__appinfo:get_all_xsd_default_db>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd_default_db>
- </xsl:when>
-
- <xsl:when test=" contains(document-uri(/), $default_db.dir) and substring($default_db.dir, string-length($default_db.dir), 1) = '/' ">
- <xsl:comment>#617B NOT ignored schema by contains(document-uri(/), $default_db.dir) == (<xsl:value-of select="$default_db.dir"/>) (<xsl:value-of select="document-uri(/)"/>)</xsl:comment>
- <system_cache__appinfo:get_all_xsd_default_db>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd_default_db>
- </xsl:when>
-
- <!--<xsl:when test=" contains(document-uri(/), $default_db.dir) ">
- <xsl:comment>#617C NOT ignored schema by contains(document-uri(/), $default_db.dir) == (<xsl:value-of select="$default_db.dir"/>) (<xsl:value-of select="document-uri(/)"/>)</xsl:comment>
- <xsl:comment>debug last (<xsl:value-of select="substring($default_db.dir, string-length($default_db.dir), 1)"/>)</xsl:comment>
- <system_cache__appinfo:get_all_xsd_default_db>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd_default_db>
- </xsl:when>-->
-
- <xsl:when test=" contains(document-uri(/), $external_schema_table.path)">
- <system_cache__appinfo:get_all_xsd_external_schema_table>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $external_schema_table.path)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd_external_schema_table>
- </xsl:when>
- <xsl:when test=" contains(document-uri(/), $WPS_Functions)">
- <xsl:comment>#700 (!NOT) ignored schema by contains(document-uri(/), $WPS_Functions) (<xsl:value-of select="$WPS_Functions"/>)</xsl:comment>
- <xsl:message>#700 (!NOT) ignored schema by contains(document-uri(/), $WPS_Functions)</xsl:message>
- <!--<system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $WPS_Functions)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:attribute name="WPS_Functions" select="$WPS_Functions"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd>-->
- </xsl:when>
-
- <xsl:when test=" contains(document-uri(/), $procesy5_system_schema_collection_dir)">
- <xsl:comment>#701 (!NOT) ignored schema by contains(document-uri(/), $procesy5_system_schema_collection_dir) (<xsl:value-of select="document-uri(/)"/>) ($procesy5_system_schema_collection_dir=(<xsl:value-of select="$procesy5_system_schema_collection_dir"/>))</xsl:comment>
- <xsl:message>#701 (!NOT) ignored schema by contains(document-uri(/), $procesy5_system_schema_collection_dir) (<xsl:value-of select="document-uri(/)"/>) ($procesy5_system_schema_collection_dir=(<xsl:value-of select="$procesy5_system_schema_collection_dir"/>))</xsl:message>
- <!--<system_cache__appinfo:get_all_xsd>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $procesy5_system_schema_collection_dir)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
- <xsl:attribute name="WPS_Functions" select="$WPS_Functions"/>
- <xsl:copy-of select="/"/>
- </system_cache__appinfo:get_all_xsd>-->
- <xsl:comment> #701 test ant-object:location__x3A__default_db.validate = "<xsl:value-of select="ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))"/>" </xsl:comment>
-
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:comment>#641 Otherwise - try substring after /public_html from <xsl:value-of select="document-uri(/)"/></xsl:comment>
- <xsl:message>#641 Otherwise - try substring after /public_html from <xsl:value-of select="document-uri(/)"/></xsl:message>
- <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>#671 schemat dla XML primitives <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:message>
- <xsl:comment>#671 schemat dla XML primitives <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:comment>
- <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>#680 schemat dla XML primitives/derived <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:message>
- <xsl:comment>#680 schemat dla XML primitives/derived <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:comment>
- <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:copy-of select="$system_cache__appinfo:p5Type.xsd//@system_cache__appinfo:document-uri"/>
- <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>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="'https://biuro.biall-net.pl/wfs'"/>
- <xsl:copy-of select="$system_cache__appinfo:p5.xsd//@system_cache__appinfo:document-uri"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'https://biuro.biall-net.pl/wfs'"/>
- <xsl:copy-of select="$system_cache__appinfo:p5.xsd"/>
- </system_cache__appinfo:get_all_xsd>
-
-
- <system_cache__appinfo:get_all_xsd>
- <xsl:copy-of select="$system_cache__appinfo:SVG.xsd//@system_cache__appinfo:document-uri"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:SVG.xsd//@targetNamespace"/>
- <xsl:copy-of select="$system_cache__appinfo:SVG.xsd"/>
- </system_cache__appinfo:get_all_xsd>
-
- <system_cache__appinfo:get_all_xsd>
- <xsl:copy-of select="$system_cache__appinfo:xlink.xsd//@system_cache__appinfo:document-uri"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:xlink.xsd//@targetNamespace"/>
- <xsl:copy-of select="$system_cache__appinfo:xlink.xsd"/>
- </system_cache__appinfo:get_all_xsd>
-
- <system_cache__appinfo:get_all_xsd>
- <xsl:copy-of select="$system_cache__appinfo:xml.xsd//@system_cache__appinfo:document-uri"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:xml.xsd//@targetNamespace"/>
- <xsl:copy-of select="$system_cache__appinfo:xml.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: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|system_cache__appinfo:get_all_xsd_default_db)/schema/namespace::node()"
- xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <ns element="{name(..)}" prefix="{name()}" uri="{.}" debug="l.849"
- system_cache__appinfo:document-uri="{../../@system_cache__appinfo:document-uri}"/>
- </xsl:for-each>
- <xsl:for-each select="//system_cache__appinfo:get_all_xsd_default_db/schema"
- xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:variable name="targetNamespace" select="@targetNamespace"/>
- <xsl:choose>
- <xsl:when test="namespace::node()=$targetNamespace">
- <xsl:message>#701-A OK $targetNamespace <xsl:value-of select="$targetNamespace"/> has declared prefix </xsl:message>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#701-B WARNING we should crete prefix ($zasob_id_db_targetNamespace_detect_string=<xsl:value-of select="$zasob_id_db_targetNamespace_detect_string"/>) for $targetNamespace <xsl:value-of select="$targetNamespace"/> = <xsl:value-of select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($targetNamespace)"/> </xsl:message>
- <ns element="{name(.)}"
- debug="l.862"
- prefix="{system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($targetNamespace)}"
- uri="{$targetNamespace}"
- system_cache__appinfo:document-uri="{../@system_cache__appinfo:document-uri}"/>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:for-each>
- </system_cache__appinfo:vrtfNamespaces>
- </xsl:template>
-
-
-
-
-
-
- <!--<xsl:function name="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename">
- <xsl:param name="template_context"/><!-\- system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_complexType , system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_element -\->
- <xsl:param name="parent_type"/>
-
- <xsl:choose>
- <xsl:when test="$template_context='system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_element'">
- <xsl:value-of select="concat($default_db.instance.xml,'/detect_resource_type/element-',system_cache__appinfo:escape_object_prefix_to_string($parent_type),'.xml')"/>
- </xsl:when>
- <xsl:when test="$template_context='system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_complexType'">
- <xsl:value-of select="concat($default_db.instance.xml,'/detect_resource_type/complexType-',system_cache__appinfo:escape_object_prefix_to_string($parent_type),'.xml')"/>
- </xsl:when>
- <xsl:otherwise><xsl:message terminate="yes">#767 unknown type $template_context=<xsl:value-of select="$template_context"/></xsl:message></xsl:otherwise>
- </xsl:choose>
- </xsl:function>
- -->
-
-
-
-
-
-
-
-
- <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:use-attribute-sets="p5ant-interface:xslt.param.get_all_xsd_list">
- <xsl:attribute name="default_db.dir" select="$default_db.dir"/>
- <xsl:attribute name="WPS_Functions" select="$WPS_Functions"/>
- <xsl:attribute name="default_db_xml_cache.public" select="$default_db_xml_cache.public"/>
- <xsl:attribute name="external_schema" select="$external_schema"/>
- <xsl:attribute name="p5Type.basedir" select="$p5Type.basedir"/>
- <xsl:comment>#909 simpleType</xsl:comment>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'simpleType'" tunnel="yes"/>
- </xsl:apply-templates>
- <xsl:comment>#913 complexType</xsl:comment>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'complexType'" tunnel="yes"/>
- </xsl:apply-templates>
- <xsl:comment>#917 element</xsl:comment>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'element'" tunnel="yes"/>
- </xsl:apply-templates>
- </system_cache__appinfo:element_complexType>
- </xsl:template>
-
- <xsl:template match="system_cache__appinfo: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']" mode="system_cache__appinfo:element_complexType">
- <xsl:param name="system_cache__appinfo:element_complexType.requested" required="yes" tunnel="yes"/>
- <xsl:apply-templates mode="#current"/>
- </xsl:template>
-
-
- <xsl:template match="system_cache__appinfo:get_all_xsd" mode="system_cache__appinfo:element_complexType">
- <xsl:comment>#927 filtered default bypassed <xsl:value-of select="@system_cache__appinfo:document-uri"/></xsl:comment>
- </xsl:template>
-
- <xsl:template match="schema" mode="system_cache__appinfo:element_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
- <xsl:param name="system_cache__appinfo:element_complexType.requested" required="yes" tunnel="yes"/>
-
- <!-- <xsl:sort select="max( */*/count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))" order="ascending" data-type="number"/>-->
- <xsl:variable name="get_all_xsd_236" select="."/>
- <!--<xsl:comment>
- max1="<xsl:value-of select="max( count(*/*/descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))"/>"
- max1=2<xsl:value-of select="max( */*/count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))"/>"
- 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="parent::*"/>
- <!--<xsl:for-each select="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">--><!--[ @targetNamespace != $targetNamespace ] namespace::node() = $targetNamespace and @targetNamespace='moj_ogrodek' -->
- <!--<xsl:sort select="max( */count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))+" order="ascending" data-type="number"/>-->
- <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:variable name="prefix_134">
- <xsl:choose>
- <xsl:when test="string-length(namespace::node()[. = $targetNamespace_134][1]/name()) > 0">
- <xsl:value-of select="namespace::node()[. = $targetNamespace_134][1]/name()"/>
- <xsl:message>#784-A TODO test=<xsl:value-of select="namespace::node()[. = $targetNamespace_134][1]/name()"/>;</xsl:message>
- </xsl:when>
- <xsl:when test="$schema_node_144/@WPS_Functions">
- <xsl:message>#784-B TODO ERROR - FORCING PREFIX TO <xsl:value-of select="tokenize($schema_node_144/@system_cache__appinfo:document-uri,'/')[ position() = last()]"/></xsl:message>
- <xsl:value-of select="tokenize(../@system_cache__appinfo:document-uri,'/')[ position() = last()]"/>
- </xsl:when>
- <xsl:when test="contains(../@system_cache__appinfo:document-uri-full,$p5Type.basedir)">
- <xsl:message>#784-C TODO TYPES WARNING - FORCING PREFIX TO <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string(@targetNamespace)"/></xsl:message>
- <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string(@targetNamespace)"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="not(@targetNamespace) or not( string-length($prefix_134) > 0) ">
- <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"/> ; ($prefix_134=<xsl:value-of select="$prefix_134"/>)</xsl:message>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="not($system_cache__appinfo:element_complexType.requested='element')"/>
- <xsl:when test="@targetNamespace='http://www.w3.org/2001/XMLSchema'"/>
- <xsl:when test="@targetNamespace='http://biuro.biall-net.pl/p5/schema/types'"/>
- <xsl:when test="contains(@system_cache__appinfo:document-uri-full,'http://')"/>
- <xsl:when test="contains(@system_cache__appinfo:document-uri-full,'https://')"/>
- <xsl:otherwise>
- <xsl:element name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd">
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select=".././@*"/>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
-
- <!--</xsl:for-each>-->
-
-
-
- <xsl:if test="count(.//node()[(local-name()='element' or local-name()='simpleType' 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="*[local-name()=$system_cache__appinfo:element_complexType.requested]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"><!-- dla ograniczenia mozna [$prefix_134='test_objects']-->
- <xsl:sort select="max( count(descendant-or-self::*[@ref or not(contains(@type,'xs:')) ]))" order="ascending" data-type="number"/>
- <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:when test="local-name()='simpleType'"><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: count(descendant-or-self::*)="<xsl:value-of select="count(descendant-or-self::*)"/>"
- count2(descendant-or-self::*)="<xsl:value-of select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>"
- 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" >
- <xsl:attribute name="id" select="@id"/>
- <xsl:attribute name="count" select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>
- <xsl:attribute name="id.int.rand" select="system_cache__appinfo:id.int.rand(@id)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="../.././@system_cache__appinfo:document-uri"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="../.././@system_cache__appinfo:document-uri-full"/>
- <xsl:attribute name="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename" select="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
- <xsl:attribute name="complexType_or_element_name" select="$complexType_or_element_name186"/>
- <xsl:attribute name="p5opr:element-filename" select="p5opr:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
- <xsl:attribute name="system_cache__appinfo:path" select="concat(../@targetNamespace,'/',$complexType_or_element_name186)"/>
- <xsl:copy-of select="@system_cache__appinfo:path.2863.len.limit"/>
- <!--<xsl:attribute name="system_cache__appinfo:element-filename" select="system_cache__appinfo:element-filename()"/>-->
- <with-param name="element" select="{$prefix_134}:{$complexType_or_element_name186}"/>
- <system_cache__appinfo:element-filename><xsl:value-of select="system_cache__appinfo:element-filename('build_element',@name,$prefix_134,$targetNamespace_134)"/></system_cache__appinfo:element-filename>
- <system_cache__appinfo:element-filename-prefixed><xsl:value-of select="system_cache__appinfo:element-filename-prefixed('build_element',@name,$prefix_134,$targetNamespace_134)"/></system_cache__appinfo:element-filename-prefixed>
- <p5_tr_map:element-filename><xsl:value-of select="p5_tr_map:element-filename('go_recurse_from_root_by_build_element_cache',concat($prefix_134,':',$complexType_or_element_name186))"/></p5_tr_map:element-filename>
- <p5_tr_map:element-filename-prefixed><xsl:value-of select="p5_tr_map:element-filename-prefixed(concat($prefix_134,':',$complexType_or_element_name186))"/></p5_tr_map:element-filename-prefixed>
- <system_cache__appinfo:targetNamespace><xsl:value-of select="../@targetNamespace"/></system_cache__appinfo:targetNamespace>
- <system_cache__appinfo:name><xsl:value-of select="@name"/></system_cache__appinfo:name>
- <system_cache__appinfo:prefix><xsl:value-of select="$prefix_134"/></system_cache__appinfo:prefix>
- <p5_simpleSchema_map:element-filename><xsl:value-of select="p5_simpleSchema_map:element-filename(concat($prefix_134,':',$complexType_or_element_name186),.././@targetNamespace)"/></p5_simpleSchema_map:element-filename>
- <!--<system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename><xsl:value-of select="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename('system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_element',concat($prefix_134,':',$complexType_or_element_name186))"/></system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename>-->
- </build_cache>
- </xsl:when>
- <xsl:when test="local-name()='complexType'">
- <build_cache name="build_complexType" >
- <xsl:attribute name="id" select="@id"/>
- <xsl:attribute name="count" select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>
- <xsl:attribute name="id.int.rand" select="system_cache__appinfo:id.int.rand(@id)"/>
- <!--<xsl:message>#808.1.DEBUG ok</xsl:message>-->
- <xsl:attribute name="system_cache__appinfo:document-uri" select="../.././@system_cache__appinfo:document-uri"/>
- <!--<xsl:message>#808.2.DEBUG ok</xsl:message>-->
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="../.././@system_cache__appinfo:document-uri-full"/>
- <!--<xsl:message>#808.3.DEBUG ok</xsl:message>-->
- <xsl:attribute name="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename" select="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
- <!--<xsl:message>#808.4.DEBUG ok</xsl:message>-->
- <xsl:attribute name="complexType_or_element_name" select="$complexType_or_element_name186"/>
- <!--<xsl:message>#808.5.DEBUG ok</xsl:message>-->
- <xsl:attribute name="p5opr:element-filename" select="p5opr:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
- <!--<xsl:message>#808.6.DEBUG ok</xsl:message>-->
- <xsl:attribute name="system_cache__appinfo:path" select="concat(../@targetNamespace,'/',$complexType_or_element_name186)"/>
- <xsl:copy-of select="@system_cache__appinfo:path.2863.len.limit"/>
- <with-param name="complexType"
- select="{$prefix_134}:{$complexType_or_element_name186}"/>
- <!--<xsl:message>#808.7.DEBUG ok</xsl:message>-->
- <system_cache__appinfo:element-filename><xsl:value-of select="system_cache__appinfo:element-filename('build_complexType',@name,$prefix_134,$targetNamespace_134)"/></system_cache__appinfo:element-filename>
- <!--<system_cache__appinfo:element-filename-prefixed><xsl:value-of select="system_cache__appinfo:element-filename-prefixed('build_complexType',@name,$prefix_134,$targetNamespace_134)"/></system_cache__appinfo:element-filename-prefixed>-->
- <!--<xsl:message>#808.8.DEBUG ok</xsl:message>-->
- <p5_tr_map:element-filename><xsl:value-of select="p5_tr_map:element-filename('go_recurse_from_root_by_build_complexType_cache',concat($prefix_134,':',$complexType_or_element_name186))"/></p5_tr_map:element-filename>
- <!--<xsl:message>#808.9.DEBUG ok</xsl:message>-->
- <system_cache__appinfo:targetNamespace><xsl:value-of select="../@targetNamespace"/></system_cache__appinfo:targetNamespace>
- <system_cache__appinfo:name><xsl:value-of select="@name"/></system_cache__appinfo:name>
- <system_cache__appinfo:prefix><xsl:value-of select="$prefix_134"/></system_cache__appinfo:prefix>
- <!--<system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename><xsl:value-of select="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename('system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_complexType',concat($prefix_134,':',$complexType_or_element_name186))"/></system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename>-->
- </build_cache>
- </xsl:when>
-
- <xsl:when test="local-name()='simpleType'">
- <build_cache name="build_complexType__simpleType" >
- <xsl:attribute name="id" select="@id"/>
- <xsl:attribute name="count" select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>
- <xsl:attribute name="id.int.rand" select="system_cache__appinfo:id.int.rand(@id)"/>
- <xsl:attribute name="system_cache__appinfo:document-uri" select="../.././@system_cache__appinfo:document-uri"/>
- <xsl:attribute name="system_cache__appinfo:document-uri-full" select="../.././@system_cache__appinfo:document-uri-full"/>
- <xsl:attribute name="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename" select="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
- <xsl:attribute name="complexType_or_element_name" select="$complexType_or_element_name186"/>
- <xsl:attribute name="p5opr:element-filename" select="p5opr:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
- <xsl:attribute name="system_cache__appinfo:path" select="concat(../@targetNamespace,'/',$complexType_or_element_name186)"/>
- <xsl:attribute name="debug.targetNamespace" select="parent::*/@targetNamespace "/>
- <!--<xsl:attribute name="debug.prefix" select="parent::*/namespace::*[ . = @targetNamespace ]/name()"/>-->
- <xsl:attribute name="debug.prefix" select="parent::*/namespace::*[ . = ../@targetNamespace ]/name()"/>
- <xsl:attribute name="debug.prefix2" select="parent::*/namespace::*[ . = ../@targetNamespace and not(name()='') ]/name()"/>
- <xsl:copy-of select="@system_cache__appinfo:path.2863.len.limit"/>
- <!--<xsl:attribute name="system_cache__appinfo:element-filename" select="system_cache__appinfo:element-filename()"/>-->
- <!--<with-param name="element" select="{$prefix_134}:{$complexType_or_element_name186}"/>-->
- <xsl:choose>
- <xsl:when test="not(parent::*/namespace::*[ . = ../@targetNamespace and not(name()='') ])">
- <xsl:message terminate="yes">#952 ERROR WITH @targetNamespace="<xsl:value-of select="parent::*/@targetNamespace "/>"; @system_cache__appinfo:document-uri-full="<xsl:value-of select="../.././@system_cache__appinfo:document-uri-full"/>" </xsl:message>
- </xsl:when>
- </xsl:choose>
- <with-param name="element" select="{parent::*/namespace::*[ . = ../@targetNamespace and not(name()='')]/name()}:{$complexType_or_element_name186}"/>
- <system_cache__appinfo:element-filename><xsl:value-of select="system_cache__appinfo:element-filename('build_complexType__simpleType',@name,$prefix_134,$targetNamespace_134)"/></system_cache__appinfo:element-filename>
- <system_cache__appinfo:element-filename-prefixed><xsl:value-of select="system_cache__appinfo:element-filename-prefixed('build_complexType__simpleType',@name,$prefix_134,$targetNamespace_134)"/></system_cache__appinfo:element-filename-prefixed>
- <p5_tr_map:element-filename><xsl:value-of select="p5_tr_map:element-filename('go_recurse_from_root_by_build_element_cache',concat($prefix_134,':',$complexType_or_element_name186))"/></p5_tr_map:element-filename>
- <p5_tr_map:element-filename-prefixed><xsl:value-of select="p5_tr_map:element-filename-prefixed(concat($prefix_134,':',$complexType_or_element_name186))"/></p5_tr_map:element-filename-prefixed>
- <system_cache__appinfo:targetNamespace><xsl:value-of select="../@targetNamespace"/></system_cache__appinfo:targetNamespace>
- <system_cache__appinfo:name><xsl:value-of select="@name"/></system_cache__appinfo:name>
- <system_cache__appinfo:prefix><xsl:value-of select="$prefix_134"/></system_cache__appinfo:prefix>
- <p5_simpleSchema_map:element-filename><xsl:value-of select="p5_simpleSchema_map:element-filename(concat($prefix_134,':',$complexType_or_element_name186),.././@targetNamespace)"/></p5_simpleSchema_map:element-filename>
- <!--<system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename><xsl:value-of select="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename('system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_element',concat($prefix_134,':',$complexType_or_element_name186))"/></system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename>-->
- </build_cache>
- </xsl:when>
-
- </xsl:choose>
- </xsl:for-each>
- </xsl:if>
-
- </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>
|