| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184 |
- <?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="ignore_SVG.xsd"/>
- <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:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
- <xsl:choose>
- <xsl:when test="string-length($detect_prefix) > 0">
- <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: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:when>
- <xsl:otherwise>
- <xsl:comment>#445 igored not targetnamespace for file <xsl:value-of select="$system_cache__appinfo:document-uri"/></xsl:comment>
- <xsl:message>#445 igored not targetnamespace for file <xsl:value-of select="$system_cache__appinfo:document-uri"/></xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
- </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,'/')) or document-uri(/) = $external_schema or contains(document-uri(/), concat('file:',$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,'/')) or document-uri(/) = $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"/>)) ($default_db.dir=<xsl:value-of select="$default_db.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>
-
-
- <xsl:choose>
- <xsl:when test="string-length($ignore_SVG.xsd) > 0"></xsl:when>
- <xsl:otherwise>
- <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>
- </xsl:otherwise>
- </xsl:choose>
-
-
- <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>
- <xsl:comment>#917b group</xsl:comment>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'group'" 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' or local-name()='group' ) 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:when test="local-name()='group'"><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="simpleType" 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_simpleType_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()='group'">
- <build_cache name="build_complexType__group" >
- <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="group" 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__group',@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__group',@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_group_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>
|