get_all_xsd.xsl 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. exclude-result-prefixes="xs hfp"
  5. version="2.0"
  6. xmlns:p5_tr_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd"
  7. xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
  8. 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"
  9. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  10. xmlns:p5opr="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd"
  11. xmlns:p5_simpleSchema_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/p5_simpleSchema_map.xsd"
  12. xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
  13. xmlns:ant-object="http://biuro.biall-net.pl/xmlschema_procesy5/ant-object/ant-object.xsd"
  14. xmlns:p5ant-interface="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface.xsd"
  15. >
  16. <xsl:import href="system_cache__appinfo/vrtfNamespaces.xsl"/>
  17. <xsl:import href="p5_tr_map/element-filename.xsl"/>
  18. <xsl:import href="object_parent_relations/element-filename.xsl"/> <!-- param name="p5opr:detect_objects_parent_relations.local" required="yes" -->
  19. <xsl:import href="system_cache__appinfo/basedir.xsl"/>
  20. <xsl:include href="p5_simpleSchema_map/element-filename.xsl"/>
  21. <xsl:include href="../ant-object/default_db.ant-object.basedir.xsl"/>
  22. <xsl:include href="../ant-object/ant-object.xsl"/>
  23. <!--<xsl:import href="system_cache__appinfo/element-filename.xsl"/>-->
  24. <xsl:output indent="yes"/>
  25. <xsl:strip-space elements="*"/>
  26. <xsl:param name="ignore_SVG.xsd"/>
  27. <xsl:param name="vc:minVersion" select="'1.1'" />
  28. <xsl:param name="vc:maxVersion"/>
  29. <xsl:param name="procesy5_system_schema" select="'../default_db.instance.xml/transformed/procesy5_system_schema.xml'"/>
  30. <xsl:param name="procesy5_system_schema_collection_dir" select="'../'"/>
  31. <xsl:param name="cache" select="'read'"/>
  32. <xsl:param name="targetNamespace_DEFAULTS" select="'http://biuro.biall-net.pl/xmlschema_procesy5/default_db'"/>
  33. <xsl:param name="external_schema" required="yes" /> <!-- select="'/public_html/external_schema'" -->
  34. <xsl:param name="external_schema_id_namespace_prefix" select="'/public_html/external_schema_id_namespace_prefix'"/>
  35. <xsl:param name="XMLSchema_prefix" select="'xs'"/>
  36. <xsl:param name="external_schema_table.path" required="yes"/>
  37. <xsl:param name="default_db.dir" required="yes" /> <!-- select="'/public_html/default_db/'" -->
  38. <xsl:param name="default_db_xml_cache.public" required="yes"/><!-- select="'/public_html/default_db_xml_cache.public/'" -->
  39. <xsl:param name="targetNamespace_DEFAULTS_prefix" select="'default_db'"/>
  40. <xsl:param name="WPS_Functions" required="yes" /><!-- select="'public_html/WPS_Functions/'" -->
  41. <xsl:param name="new-schema-with-ID-to-move-and-rename-to-xsd" select="'/new-schema-with-ID-to-move-and-rename-to-xsd'"/>
  42. <xsl:param name="default_db.instance.xml" required="yes"/> <!-- todo better always include get_all_xsd -->
  43. <xsl:param name="p5build_SE.INSTALL_ROOT.repository.symlink" select="'/repository.symlink/'"/>
  44. <xsl:param name="p5Type.basedir" required="yes"/> <!-- select="'public_html/Types/'" -->
  45. <xsl:include href="../default_db_xml_cache.public/xml-schema-primitives.xsl"/>
  46. <xsl:include href="system_cache__appinfo/external_schema_targetNamespace.xsl"/>
  47. <xsl:include href="system_cache__appinfo/functions.xsl"/>
  48. <xsl:include href="system_cache__resources_tree_generate_xsl_required_occurs_raport/element-filename.xsl"/>
  49. <xsl:include href="system_cache__resources_tree_generate_xsl_required_occurs_raport/detect_resource_type.local.xsl"/>
  50. <xsl:include href="system_cache__appinfo/element-filename.xsl"/>
  51. <xsl:attribute-set name="p5ant-interface:xslt.param.get_all_xsd_list">
  52. <xsl:attribute name="default_db.ant-object.basedir" select="$default_db.ant-object.basedir"/>
  53. </xsl:attribute-set>
  54. <xsl:template name="main">
  55. <xsl:call-template name="system_cache__appinfo:get_all_xsd">
  56. <xsl:with-param name="path2collection" select="'../'"/>
  57. <xsl:with-param name="cache" select="'read'"/>
  58. </xsl:call-template>
  59. </xsl:template>
  60. <!-- BEGIN external schema templates -->
  61. <!-- <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">
  62. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema__equals"/>
  63. </xsl:template>
  64. <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"/>
  65. <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">
  66. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema__equals"/>
  67. </xsl:template> -->
  68. <xsl:template match="complexType" mode="system_cache__appinfo:get_all_xsd_default_db__equals" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" >
  69. <xsl:param name="system_cache__appinfo:get_all_xsd.row" required="yes"/>
  70. <xsl:if test="not($system_cache__appinfo:get_all_xsd.row/*)">
  71. <not_equals>
  72. <xsl:attribute name="empty" select="@name"/>
  73. </not_equals>
  74. </xsl:if>
  75. <xsl:variable name="system_cache__appinfo:get_all_xsd.row">
  76. <var>
  77. <xsl:for-each select="$system_cache__appinfo:get_all_xsd.row/*">
  78. <xsl:element name="{name()}">
  79. <xsl:attribute name="pos" select="position()"/>
  80. <xsl:copy-of select="@*"/>
  81. <xsl:copy-of select="*"/>
  82. </xsl:element>
  83. </xsl:for-each>
  84. </var>
  85. </xsl:variable>
  86. <system_cache__appinfo:get_all_xsd_default_db__equals>
  87. <xsl:copy-of select="@*"/>
  88. <xsl:call-template name="system_cache__appinfo:get_all_xsd_default_db__equals">
  89. <xsl:with-param name="system_cache__appinfo:get_all_xsd_default_db" select=".[*]"/>
  90. <xsl:with-param name="system_cache__appinfo:get_all_xsd.row" select="$system_cache__appinfo:get_all_xsd.row"/>
  91. </xsl:call-template>
  92. <!--<system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
  93. <xsl:copy-of select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix"></xsl:copy-of>
  94. </system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>-->
  95. </system_cache__appinfo:get_all_xsd_default_db__equals>
  96. </xsl:template>
  97. <xsl:template match="system_cache__appinfo:get_all_xsd_external_schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" >
  98. <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" required="yes"/>
  99. <xsl:variable name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix">
  100. <var>
  101. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/*">
  102. <xsl:message>#111 @name=<xsl:value-of select="@name"/>; name()=<xsl:value-of select="name()"/></xsl:message>
  103. <xsl:element name="{name()}">
  104. <xsl:attribute name="pos" select="position()"/>
  105. <xsl:copy-of select="@*"/>
  106. <xsl:copy-of select="*"/>
  107. </xsl:element>
  108. </xsl:for-each>
  109. </var>
  110. </xsl:variable>
  111. <system_cache__appinfo:get_all_xsd_external_schema__equals>
  112. <xsl:copy-of select="@*"/>
  113. <xsl:call-template name="system_cache__appinfo:get_all_xsd_external_schema__equals">
  114. <xsl:with-param name="system_cache__appinfo:get_all_xsd_external_schema" select=".[*]"/>
  115. <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"/>
  116. </xsl:call-template>
  117. <!--<system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
  118. <xsl:copy-of select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix"></xsl:copy-of>
  119. </system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>-->
  120. </system_cache__appinfo:get_all_xsd_external_schema__equals>
  121. </xsl:template>
  122. <!--<xsl:template match="schema" mode="system_cache__appinfo:get_all_xsd_external_schema__equals" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  123. <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" required="yes"/>
  124. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema__equals">
  125. <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/*"/>
  126. </xsl:apply-templates>
  127. </xsl:template>-->
  128. <xsl:template name="system_cache__appinfo:get_all_xsd_default_db__equals" >
  129. <xsl:param name="system_cache__appinfo:get_all_xsd_default_db" required="yes"/>
  130. <xsl:param name="system_cache__appinfo:get_all_xsd.row" required="yes"/>
  131. <!--<pre_external_schema>
  132. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema/*">
  133. <xsl:element name="{name()}"><xsl:copy-of select="@*"/></xsl:element>
  134. </xsl:for-each>
  135. </pre_external_schema>
  136. <pre_schema_id_namespace_prefix>
  137. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*">
  138. <xsl:element name="{name()}"><xsl:copy-of select="@*"/></xsl:element>
  139. </xsl:for-each>
  140. </pre_schema_id_namespace_prefix>-->
  141. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_default_db/*">
  142. <xsl:variable name="position" select="position()"/>
  143. <xsl:comment> Try position <xsl:value-of select="$position"/>;</xsl:comment>
  144. <xsl:choose>
  145. <!--<xsl:when test="not($position = $pos)">
  146. <not_pos>
  147. <xsl:attribute name="pos" select="$pos"/>
  148. <xsl:attribute name="position" select="$position"/>
  149. <xsl:attribute name="expected" select="local-name()"/>
  150. </not_pos>
  151. </xsl:when>-->
  152. <xsl:when test="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/local-name() = local-name()">
  153. <equals>
  154. <xsl:attribute name="position" select="position()"/>
  155. <xsl:attribute name="expected" select="local-name()"/>
  156. <xsl:attribute name="found" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/local-name()"/>
  157. <xsl:attribute name="found.name" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@name"/>
  158. <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd.row/var[1]/name()"/>
  159. </equals>
  160. <!--<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>-->
  161. </xsl:when>
  162. <xsl:otherwise>
  163. <not_equals>
  164. <xsl:attribute name="position" select="position()"/>
  165. <xsl:attribute name="expected" select="local-name()"/>
  166. <xsl:attribute name="expected.name" select="@name"/>
  167. <xsl:attribute name="found" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/local-name()"/>
  168. <xsl:attribute name="found.name" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@name"/>
  169. <xsl:attribute name="found_id" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@id"/>
  170. <xsl:attribute name="found_pos" select="$system_cache__appinfo:get_all_xsd.row/var/*[ @pos = $position]/@pos"/>
  171. <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd.row/var/*[1]/name()"/>
  172. </not_equals>
  173. </xsl:otherwise>
  174. </xsl:choose>
  175. <!--<child>-->
  176. <xsl:variable name="system_cache__appinfo:get_all_xsd_default_db_new">
  177. <var>
  178. <xsl:for-each select="$system_cache__appinfo:get_all_xsd.row/var/*[@pos=$position]/*">
  179. <xsl:element name="{name()}">
  180. <xsl:attribute name="pos" select="position()"/>
  181. <xsl:copy-of select="@*"/>
  182. <xsl:copy-of select="*"/>
  183. </xsl:element>
  184. </xsl:for-each>
  185. </var>
  186. </xsl:variable>
  187. <!--<test_var_new><xsl:copy-of select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix_new"/></test_var_new>-->
  188. <xsl:call-template name="system_cache__appinfo:get_all_xsd_default_db__equals">
  189. <xsl:with-param name="system_cache__appinfo:get_all_xsd_default_db" select=".[*]"/>
  190. <xsl:with-param name="system_cache__appinfo:get_all_xsd.row" select="$system_cache__appinfo:get_all_xsd_default_db_new/.[*]"/>
  191. </xsl:call-template>
  192. <!--</child>-->
  193. </xsl:for-each>
  194. </xsl:template>
  195. <xsl:template name="system_cache__appinfo:get_all_xsd_external_schema__equals" >
  196. <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema" required="yes"/>
  197. <xsl:param name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" required="yes"/>
  198. <!--<pre_external_schema>
  199. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema/*">
  200. <xsl:element name="{name()}"><xsl:copy-of select="@*"/></xsl:element>
  201. </xsl:for-each>
  202. </pre_external_schema>
  203. <pre_schema_id_namespace_prefix>
  204. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*">
  205. <xsl:element name="{name()}"><xsl:copy-of select="@*"/></xsl:element>
  206. </xsl:for-each>
  207. </pre_schema_id_namespace_prefix>-->
  208. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema/*">
  209. <xsl:variable name="position" select="position()"/>
  210. <xsl:comment> Try position <xsl:value-of select="$position"/>;</xsl:comment>
  211. <xsl:choose>
  212. <!--<xsl:when test="not($position = $pos)">
  213. <not_pos>
  214. <xsl:attribute name="pos" select="$pos"/>
  215. <xsl:attribute name="position" select="$position"/>
  216. <xsl:attribute name="expected" select="local-name()"/>
  217. </not_pos>
  218. </xsl:when>-->
  219. <xsl:when test="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/local-name() = local-name()">
  220. <!--<equals>
  221. <xsl:attribute name="position" select="position()"/>
  222. <xsl:attribute name="expected" select="local-name()"/>
  223. <xsl:attribute name="found" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/local-name()"/>
  224. <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var[1]/name()"/>
  225. </equals>-->
  226. <!--<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>-->
  227. </xsl:when>
  228. <xsl:otherwise>
  229. <not_equals>
  230. <xsl:attribute name="position" select="position()"/>
  231. <xsl:attribute name="expected" select="local-name()"/>
  232. <xsl:attribute name="found" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/local-name()"/>
  233. <xsl:attribute name="found_id" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/@id"/>
  234. <xsl:attribute name="found_pos" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[ @pos = $position]/@pos"/>
  235. <xsl:attribute name="first_el_par" select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[1]/name()"/>
  236. </not_equals>
  237. </xsl:otherwise>
  238. </xsl:choose>
  239. <!--<child>-->
  240. <xsl:variable name="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix_new">
  241. <var>
  242. <xsl:for-each select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix/var/*[@pos=$position]/*">
  243. <xsl:element name="{name()}">
  244. <xsl:attribute name="pos" select="position()"/>
  245. <xsl:copy-of select="@*"/>
  246. <xsl:copy-of select="*"/>
  247. </xsl:element>
  248. </xsl:for-each>
  249. </var>
  250. </xsl:variable>
  251. <!--<test_var_new><xsl:copy-of select="$system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix_new"/></test_var_new>-->
  252. <xsl:call-template name="system_cache__appinfo:get_all_xsd_external_schema__equals">
  253. <xsl:with-param name="system_cache__appinfo:get_all_xsd_external_schema" select=".[*]"/>
  254. <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/.[*]"/>
  255. </xsl:call-template>
  256. <!--</child>-->
  257. </xsl:for-each>
  258. </xsl:template>
  259. <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">
  260. <xsl:param name="system_cache__appinfo:document-uri" required="yes"/>
  261. <xsl:variable name="targetNamespace" select="@targetNamespace"/>
  262. <xsl:variable name="namespaces_cur">
  263. <namespaces_cur>
  264. <xsl:for-each select="namespace::node()">
  265. <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
  266. </xsl:for-each>
  267. </namespaces_cur>
  268. </xsl:variable>
  269. <xsl:element name="schema" namespace="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="#default" inherit-namespaces="yes">
  270. <xsl:choose>
  271. <xsl:when test="@targetNamespace and ( not($namespaces_cur//ns[@uri=$targetNamespace]/@prefix) or $namespaces_cur//ns[@uri=$targetNamespace]/@prefix='' ) " xpath-default-namespace="">
  272. <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
  273. <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace(@targetNamespace)"/>
  274. <xsl:copy-of select="namespace::node()"/>
  275. <xsl:namespace name="p5Type" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
  276. <xsl:copy-of select="@targetNamespace"/>
  277. <xsl:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
  278. <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
  279. <xsl:comment>#144 when @targetNamespace exists and prefix not exists</xsl:comment>
  280. <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>
  281. <xsl:comment> count: <xsl:value-of select="count($namespaces_cur/namespaces_cur/ns)"/> </xsl:comment>
  282. <xsl:copy-of select="*"/>
  283. </xsl:when>
  284. <xsl:when test="@targetNamespace">
  285. <xsl:variable name="detect_prefix" select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix" xpath-default-namespace=""/>
  286. <xsl:namespace name="{$detect_prefix}" select="@targetNamespace"/>
  287. <xsl:namespace name="p5Type" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
  288. <xsl:copy-of select="namespace::node()"/>
  289. <xsl:copy-of select="@targetNamespace"/>
  290. <xsl:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
  291. <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
  292. <xsl:comment>#147 when @targetNamespace and prefix probably exists!</xsl:comment>
  293. <xsl:copy-of select="*"/>
  294. </xsl:when>
  295. <xsl:otherwise>
  296. <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
  297. <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
  298. <xsl:copy-of select="namespace::node()"/>
  299. <xsl:namespace name="p5Type" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
  300. <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
  301. <xsl:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
  302. <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
  303. <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>
  304. <xsl:comment>#158 otherwise not @targetNamespace and no prefix</xsl:comment>
  305. <xsl:copy-of select="*"/>
  306. </xsl:otherwise>
  307. </xsl:choose>
  308. </xsl:element>
  309. </xsl:template>
  310. <xsl:template match="schema" mode="system_cache__appinfo:get_all_xsd_external_schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  311. <xsl:param name="system_cache__appinfo:document-uri" required="yes"/>
  312. <xsl:variable name="targetNamespace" select="@targetNamespace"/>
  313. <xsl:variable name="namespaces_cur">
  314. <namespaces_cur>
  315. <xsl:for-each select="namespace::node()">
  316. <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
  317. </xsl:for-each>
  318. </namespaces_cur>
  319. </xsl:variable>
  320. <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
  321. <xsl:choose>
  322. <xsl:when test="string-length($detect_prefix) &gt; 0">
  323. <xsl:element name="schema" namespace="http://www.w3.org/2001/XMLSchema" extension-element-prefixes="#default" inherit-namespaces="yes">
  324. <xsl:choose>
  325. <xsl:when test="@targetNamespace and ( not($namespaces_cur//ns[@uri=$targetNamespace]/@prefix) or $namespaces_cur//ns[@uri=$targetNamespace]/@prefix='' ) " xpath-default-namespace="">
  326. <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
  327. <xsl:namespace name="{$detect_prefix}" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace(@targetNamespace)"/>
  328. <xsl:copy-of select="namespace::node()"/>
  329. <xsl:copy-of select="@targetNamespace"/>
  330. <xsl:attribute name="vc:minVersion" select="'1.0'"/>
  331. <xsl:attribute name="vc:maxVersion" select="'1.1'"/>
  332. <xsl:comment>#144 when @targetNamespace exists and prefix not exists</xsl:comment>
  333. <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>
  334. <xsl:comment> count: <xsl:value-of select="count($namespaces_cur/namespaces_cur/ns)"/> </xsl:comment>
  335. <!--<xsl:for-each select="$namespaces_cur/namespaces_cur/ns">
  336. <xsl:comment> ns @element=<xsl:value-of select="@element"/>; @prefix=<xsl:value-of select="@prefix"/>; @uri=<xsl:value-of select="@uri"/>;</xsl:comment>
  337. </xsl:for-each>-->
  338. <!-- <xs:debug>
  339. <xsl:copy-of select="$namespaces_cur"/>
  340. </xs:debug>
  341. <xs:debug_filter>
  342. <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]"/>
  343. </xs:debug_filter>
  344. <xs:debug_filter_NS>
  345. <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]" xpath-default-namespace=""/>
  346. </xs:debug_filter_NS>-->
  347. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
  348. <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
  349. <xsl:with-param name="detect_targetNamespace" select="@targetNamespace"/>
  350. <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
  351. </xsl:apply-templates>
  352. </xsl:when>
  353. <xsl:when test="@targetNamespace">
  354. <xsl:variable name="detect_prefix" select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix" xpath-default-namespace=""/>
  355. <xsl:namespace name="{$detect_prefix}" select="@targetNamespace"/>
  356. <xsl:copy-of select="namespace::node()"/>
  357. <xsl:copy-of select="@targetNamespace"/>
  358. <xsl:attribute name="vc:minVersion" select="'1.1'"/>
  359. <!--<xsl:attribute name="vc:maxVersion" select="'1.1'"/>-->
  360. <xsl:comment>#147 when @targetNamespace and prefix probably exists!</xsl:comment>
  361. <!--<xsl:copy-of select="*" copy-namespaces="yes"/>-->
  362. <!--<xs:debug_test>
  363. <xsl:value-of select="$namespaces_cur//ns[@uri=$targetNamespace]/@prefix"/>
  364. </xs:debug_test>
  365. <xs:debug>
  366. <xsl:copy-of select="$namespaces_cur"/>
  367. </xs:debug>
  368. <xs:debug_filter>
  369. <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]"/>
  370. </xs:debug_filter>
  371. <xs:debug_filter_NS>
  372. <xsl:copy-of select="$namespaces_cur//ns[@uri=$targetNamespace]" xpath-default-namespace=""/>
  373. </xs:debug_filter_NS>-->
  374. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>
  375. </xsl:when>
  376. <xsl:otherwise>
  377. <xsl:variable name="detect_prefix" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace_prefix($system_cache__appinfo:document-uri)"/>
  378. <xsl:copy-of select="namespace::node()"/>
  379. <xsl:attribute name="targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
  380. <xsl:if test="$vc:minVersion"><xsl:attribute name="vc:minVersion" select="$vc:minVersion"/></xsl:if>
  381. <xsl:if test="$vc:maxVersion"><xsl:attribute name="vc:maxVersion" select="$vc:maxVersion"/></xsl:if>
  382. <!--<xsl:attribute name="vc:maxVersion" select="'1.1'"/>-->
  383. <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>
  384. <xsl:comment>#158 otherwise not @targetNamespace and no prefix</xsl:comment>
  385. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
  386. <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
  387. <xsl:with-param name="detect_targetNamespace" select="system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($system_cache__appinfo:document-uri)"/>
  388. <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
  389. </xsl:apply-templates>
  390. </xsl:otherwise>
  391. </xsl:choose>
  392. </xsl:element>
  393. </xsl:when>
  394. <xsl:otherwise>
  395. <xsl:comment>#445 igored not targetnamespace for file <xsl:value-of select="$system_cache__appinfo:document-uri"/></xsl:comment>
  396. <xsl:message>#445 igored not targetnamespace for file <xsl:value-of select="$system_cache__appinfo:document-uri"/></xsl:message>
  397. </xsl:otherwise>
  398. </xsl:choose>
  399. </xsl:template>
  400. <xsl:template match="*" mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  401. <xsl:element name="{$XMLSchema_prefix}:{local-name()}" namespace="http://www.w3.org/2001/XMLSchema">
  402. <xsl:apply-templates select="@*" mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>
  403. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix"/>
  404. </xsl:element>
  405. </xsl:template>
  406. <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix" match="@type|@base">
  407. <!-- sa bledy ze schematami z prefix xsd... -->
  408. <xsl:choose>
  409. <xsl:when test="contains(.,'xsd:')">
  410. <xsl:attribute name="{name()}" select="concat($XMLSchema_prefix,':', system_cache__appinfo:clean_object_prefix(.))"/>
  411. </xsl:when>
  412. <xsl:otherwise>
  413. <xsl:attribute name="{name()}" select="."/>
  414. </xsl:otherwise>
  415. </xsl:choose>
  416. </xsl:template>
  417. <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_with_prefix" match="@*">
  418. <xsl:attribute name="{name()}" select="."/>
  419. </xsl:template>
  420. <xsl:template match="*" mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  421. <xsl:param name="detect_prefix" required="yes"/>
  422. <xsl:param name="detect_targetNamespace" required="yes"/>
  423. <xsl:param name="namespaces_cur" required="yes"/>
  424. <xsl:element name="{$XMLSchema_prefix}:{local-name()}" namespace="http://www.w3.org/2001/XMLSchema">
  425. <!--<xsl:attribute name="test_prefix" select="system_cache__appinfo:prefix_from_targetNamespace($namespaces_cur,'http://www.w3.org/2001/XMLSchema')"/>-->
  426. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" select="@*">
  427. <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
  428. <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
  429. </xsl:apply-templates>
  430. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace">
  431. <xsl:with-param name="detect_prefix" select="$detect_prefix"/>
  432. <xsl:with-param name="detect_targetNamespace" select="$detect_targetNamespace"/>
  433. <xsl:with-param name="namespaces_cur" select="$namespaces_cur"/>
  434. </xsl:apply-templates>
  435. </xsl:element>
  436. </xsl:template>
  437. <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" match="@type|@base">
  438. <!-- sa bledy ze schematami z prefix xsd... -->
  439. <xsl:param name="namespaces_cur" required="yes"/>
  440. <xsl:param name="detect_prefix" required="yes"/>
  441. <xsl:choose>
  442. <!--<xsl:when test="contains(.,'xsd:')">
  443. <xsl:attribute name="{name()}" select="concat($XMLSchema_prefix,':', system_cache__appinfo:clean_object_prefix(.))"/>
  444. </xsl:when>-->
  445. <xsl:when test="not(contains(.,':'))">
  446. <xsl:attribute name="{name()}" select="concat($detect_prefix,':',.)"/>
  447. </xsl:when>
  448. <xsl:when test="system_cache__appinfo:prefix_from_targetNamespace($namespaces_cur,'http://www.w3.org/2001/XMLSchema')=system_cache__appinfo:get_object_prefix(.)">
  449. <!--<xsl:message terminate="yes">#281 - wykryte ze jest to type XSD <xsl:value-of select="."/></xsl:message>-->
  450. <xsl:attribute name="{name()}" select="concat($XMLSchema_prefix,':', system_cache__appinfo:clean_object_prefix(.))"/>
  451. </xsl:when>
  452. <xsl:when test="contains(.,':')">
  453. <xsl:copy-of select="."/>
  454. </xsl:when>
  455. <xsl:otherwise>
  456. <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>
  457. <xsl:attribute name="{name()}" select="concat($detect_prefix,':',.)"/>
  458. </xsl:otherwise>
  459. </xsl:choose>
  460. </xsl:template>
  461. <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" match="@ref">
  462. <xsl:param name="namespaces_cur" required="yes"/>
  463. <xsl:param name="detect_prefix" required="yes"/>
  464. <xsl:attribute name="{name()}" select="concat($detect_prefix,':',.)"/>
  465. </xsl:template>
  466. <xsl:template mode="system_cache__appinfo:get_all_xsd_external_schema_not_targetNamespace" match="@*">
  467. <xsl:param name="namespaces_cur" required="yes"/>
  468. <xsl:attribute name="{name()}" select="."/>
  469. </xsl:template>
  470. <!-- EOF external schema templates -->
  471. <xsl:template name="system_cache__appinfo:get_all_xsd.verify_unique_id">
  472. <system_cache__appinfo:get_all_xsd.verify_unique_id>
  473. <xsl:variable name="system_cache__appinfo:get_all_xsd" select="doc($procesy5_system_schema)"/>
  474. <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() &lt; 100] " xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  475. <xsl:message>#486 testing <xsl:value-of select="name()"/> and @id=<xsl:value-of select="@id"/></xsl:message>
  476. <xsl:choose>
  477. <xsl:when test="count($system_cache__appinfo:get_all_xsd//*[@id = current()/@id]) &gt; 1">
  478. <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"/>
  479. </xsl:message>
  480. </xsl:when>
  481. </xsl:choose>
  482. </xsl:for-each>
  483. </system_cache__appinfo:get_all_xsd.verify_unique_id>
  484. </xsl:template>
  485. <xsl:template name="system_cache__appinfo:get_all_xsd">
  486. <xsl:param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
  487. <xsl:param name="get_system_schemas"/>
  488. <xsl:param name="cache" select="$cache"/>
  489. <xsl:variable name="element-filename" select="'procesy5_system_schema'"/>
  490. <xsl:choose>
  491. <xsl:when test="unparsed-text-available(concat('../default_db.instance.xml/transformed/',$element-filename,'.xml')) and $cache='read'">
  492. <xsl:copy-of select="doc(concat('../default_db.instance.xml/transformed/',$element-filename,'.xml'))"/>
  493. </xsl:when>
  494. <xsl:otherwise>
  495. <xsl:variable name="path">
  496. <xsl:value-of select="concat($path2collection,'?select=*.(xsd);recurse=yes;on-error=fail;xinclude=no')"/>
  497. </xsl:variable>
  498. <xsl:variable name="docs" select="collection($path)"/>
  499. <xsl:variable name="procesy5_system_schema">
  500. <system_cache__appinfo:get_all_xsd_list xsl:use-attribute-sets="p5ant-interface:xslt.param.get_all_xsd_list"
  501. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  502. 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">
  503. <xsl:for-each select="$docs">
  504. <xsl:message> get_all_xsd przetwarzam plik <xsl:value-of select="document-uri(/)"/></xsl:message>
  505. <xsl:choose>
  506. <xsl:when test="contains(document-uri(/),$p5build_SE.INSTALL_ROOT.repository.symlink)">
  507. <xsl:message>#555 ignored /$repository.symlink for <xsl:value-of select="document-uri(/)"/>"/> ;</xsl:message>
  508. </xsl:when>
  509. <xsl:when test="contains(document-uri(/),'/ant-object/') and ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))">
  510. <xsl:message>#519 NOT default_db ignored TESTING /ant-object for <xsl:value-of select="document-uri(/)"/>"/> ;</xsl:message>
  511. <xsl:comment>#519 NOT default_db ignored TESTING /ant-object test:
  512. <xsl:value-of select="ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))"/>
  513. </xsl:comment>
  514. <system_cache__appinfo:get_all_xsd debug="@2019-08 problem if should be _default_db"><!-- _default_db -->
  515. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $basedir)"/><!-- $default_db.ant-object.basedir -->
  516. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  517. <xsl:call-template name="ant-object:location__x3A__default_db.validate">
  518. <xsl:with-param name="document-uri" select="document-uri(/)"/>
  519. <xsl:with-param name="default_db.ant-object.basedir" select="$default_db.ant-object.basedir"/>
  520. </xsl:call-template>
  521. <xsl:copy-of select="/"/>
  522. </system_cache__appinfo:get_all_xsd>
  523. </xsl:when>
  524. <xsl:when test="contains(document-uri(/),'/ant-object/') and not(ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/)))">
  525. <xsl:message>#519B default_db ignored TESTING /ant-object for <xsl:value-of select="document-uri(/)"/>"/> ;</xsl:message>
  526. <xsl:comment>#519B default_db ignored TESTING /ant-object test:
  527. <xsl:value-of select="ant-object:location__x3A__default_db.validate($default_db.ant-object.basedir,document-uri(/))"/>
  528. </xsl:comment>
  529. </xsl:when>
  530. <xsl:when test="contains(document-uri(/),$new-schema-with-ID-to-move-and-rename-to-xsd)">
  531. <xsl:message>#638 ignored /ant-object for <xsl:value-of select="document-uri(/)"/>;</xsl:message>
  532. </xsl:when>
  533. <xsl:when test="contains(document-uri(/),'Types/types.xsd')">
  534. <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>
  535. </xsl:when>
  536. <xsl:when test="contains(document-uri(/),'dita-ot/') and contains(document-uri(/),'/plugins/' )">
  537. <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>
  538. </xsl:when>
  539. <xsl:when test="contains(document-uri(/),'/dita_kosztorys_projektowy/') ">
  540. <xsl:message>#573 ignored contains(document-uri(/),'dita_kosztorys_projektowy') for <xsl:value-of select="document-uri(/)"/>; - TODO MAINTAIN no targetnamespace </xsl:message>
  541. </xsl:when>
  542. <xsl:when test=" contains(document-uri(/), concat($external_schema,'/')) or document-uri(/) = $external_schema or contains(document-uri(/), concat('file:',$external_schema)) ">
  543. <xsl:comment>#145 Ignored /public_html/external_schema <xsl:value-of select="document-uri(/)"/></xsl:comment>
  544. <system_cache__appinfo:get_all_xsd_external_schema>
  545. <xsl:attribute name="system_cache__appinfo:document-uri" select="system_cache__appinfo:document-uri_for_external_schema_id_namespace_prefix(document-uri(/))"/>
  546. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="system_cache__appinfo:document-uri-full_for_external_schema_id_namespace_prefix(document-uri(/))"/>
  547. <xsl:attribute name="system_cache__appinfo:document-uri-orig" select="substring-after(document-uri(/), $external_schema)"/>
  548. <!--<xsl:attribute name="system_cache__appinfo:document-uri-full-orig" select="document-uri(/)"/>-->
  549. <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  550. <xsl:element name="{name()}">
  551. <xsl:for-each select="@*">
  552. <xsl:attribute name="{name()}" select="."/>
  553. <xsl:copy-of select="child::node()"/>
  554. </xsl:for-each>
  555. </xsl:element>
  556. </xsl:for-each>-->
  557. <!--<xsl:copy-of select="/"/>-->
  558. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema" select=".">
  559. <xsl:with-param name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
  560. </xsl:apply-templates>
  561. </system_cache__appinfo:get_all_xsd_external_schema>
  562. </xsl:when>
  563. <xsl:when test=" contains(document-uri(/), concat($external_schema_id_namespace_prefix,'/')) or document-uri(/) = $external_schema_id_namespace_prefix">
  564. <xsl:comment>#248 Ignored /public_html/external_schema_id_namespace_prefix <xsl:value-of select="document-uri(/)"/></xsl:comment>
  565. <system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
  566. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
  567. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  568. <xsl:attribute name="system_cache__appinfo:document-uri-orig" select="substring-after(document-uri(/), $external_schema_id_namespace_prefix)"/>
  569. <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  570. <xsl:element name="{name()}">
  571. <xsl:for-each select="@*">
  572. <xsl:attribute name="{name()}" select="."/>
  573. <xsl:copy-of select="child::node()"/>
  574. </xsl:for-each>
  575. </xsl:element>
  576. </xsl:for-each>-->
  577. <!--<xsl:copy-of select="/"/>-->
  578. <xsl:apply-templates mode="system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix" select=".">
  579. <xsl:with-param name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $external_schema_id_namespace_prefix)"/>
  580. </xsl:apply-templates>
  581. </system_cache__appinfo:get_all_xsd_external_schema_id_namespace_prefix>
  582. </xsl:when>
  583. <xsl:when test=" contains(document-uri(/), $default_db_xml_cache.public)">
  584. <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>
  585. <system_cache__appinfo:get_all_xsd.default_db_xml_cache.public>
  586. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db_xml_cache.public)"/>
  587. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  588. <xsl:copy-of select="/"/>
  589. </system_cache__appinfo:get_all_xsd.default_db_xml_cache.public>
  590. </xsl:when>
  591. <!--<xsl:when test=" contains(document-uri(/), concat($default_db.dir,'/Types')) ">
  592. <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>
  593. <system_cache__appinfo:get_all_xsd_default_db>
  594. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
  595. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  596. <xsl:copy-of select="/"/>
  597. </system_cache__appinfo:get_all_xsd_default_db>
  598. </xsl:when>-->
  599. <xsl:when test=" contains(document-uri(/), concat($default_db.dir,'/')) ">
  600. <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>
  601. <system_cache__appinfo:get_all_xsd_default_db>
  602. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
  603. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  604. <xsl:copy-of select="/"/>
  605. </system_cache__appinfo:get_all_xsd_default_db>
  606. </xsl:when>
  607. <xsl:when test=" contains(document-uri(/), $default_db.dir) and substring($default_db.dir, string-length($default_db.dir), 1) = '/' ">
  608. <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>
  609. <system_cache__appinfo:get_all_xsd_default_db>
  610. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
  611. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  612. <xsl:copy-of select="/"/>
  613. </system_cache__appinfo:get_all_xsd_default_db>
  614. </xsl:when>
  615. <!--<xsl:when test=" contains(document-uri(/), $default_db.dir) ">
  616. <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>
  617. <xsl:comment>debug last (<xsl:value-of select="substring($default_db.dir, string-length($default_db.dir), 1)"/>)</xsl:comment>
  618. <system_cache__appinfo:get_all_xsd_default_db>
  619. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $default_db.dir)"/>
  620. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  621. <xsl:copy-of select="/"/>
  622. </system_cache__appinfo:get_all_xsd_default_db>
  623. </xsl:when>-->
  624. <xsl:when test=" contains(document-uri(/), $external_schema_table.path)">
  625. <system_cache__appinfo:get_all_xsd_external_schema_table>
  626. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $external_schema_table.path)"/>
  627. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  628. <xsl:copy-of select="/"/>
  629. </system_cache__appinfo:get_all_xsd_external_schema_table>
  630. </xsl:when>
  631. <xsl:when test=" contains(document-uri(/), $WPS_Functions)">
  632. <xsl:comment>#700 (!NOT) ignored schema by contains(document-uri(/), $WPS_Functions) (<xsl:value-of select="$WPS_Functions"/>)</xsl:comment>
  633. <xsl:message>#700 (!NOT) ignored schema by contains(document-uri(/), $WPS_Functions)</xsl:message>
  634. <!--<system_cache__appinfo:get_all_xsd>
  635. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $WPS_Functions)"/>
  636. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  637. <xsl:attribute name="WPS_Functions" select="$WPS_Functions"/>
  638. <xsl:copy-of select="/"/>
  639. </system_cache__appinfo:get_all_xsd>-->
  640. </xsl:when>
  641. <xsl:when test=" contains(document-uri(/), $procesy5_system_schema_collection_dir)">
  642. <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>
  643. <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>
  644. <system_cache__appinfo:get_all_xsd>
  645. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), $procesy5_system_schema_collection_dir)"/>
  646. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  647. <xsl:attribute name="WPS_Functions" select="$WPS_Functions"/>
  648. <xsl:copy-of select="/"/>
  649. </system_cache__appinfo:get_all_xsd>
  650. <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>
  651. </xsl:when>
  652. <xsl:otherwise>
  653. <xsl:comment>#641 Otherwise - try substring after /public_html from <xsl:value-of select="document-uri(/)"/></xsl:comment>
  654. <xsl:message>#641 Otherwise - try substring after /public_html from <xsl:value-of select="document-uri(/)"/></xsl:message>
  655. <system_cache__appinfo:get_all_xsd>
  656. <xsl:attribute name="system_cache__appinfo:document-uri" select="substring-after(document-uri(/), '/public_html/')"/>
  657. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="document-uri(/)"/>
  658. <!--<xsl:for-each select="//schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  659. <xsl:element name="{name()}">
  660. <xsl:for-each select="@*">
  661. <xsl:attribute name="{name()}" select="."/>
  662. <xsl:copy-of select="child::node()"/>
  663. </xsl:for-each>
  664. </xsl:element>
  665. </xsl:for-each>-->
  666. <xsl:copy-of select="/"/>
  667. </system_cache__appinfo:get_all_xsd>
  668. </xsl:otherwise>
  669. </xsl:choose>
  670. </xsl:for-each>
  671. <!-- -->
  672. <xsl:message>#671 schemat dla XML primitives <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:message>
  673. <xsl:comment>#671 schemat dla XML primitives <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:comment>
  674. <system_cache__appinfo:get_all_xsd>
  675. <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
  676. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
  677. <xsl:copy-of select="$system_cache__appinfo:primitives.xsd"/>
  678. </system_cache__appinfo:get_all_xsd>
  679. <xsl:message>#680 schemat dla XML primitives/derived <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:message>
  680. <xsl:comment>#680 schemat dla XML primitives/derived <xsl:value-of select="'http://www.w3.org/1999/XSL/Transform'"/></xsl:comment>
  681. <system_cache__appinfo:get_all_xsd>
  682. <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
  683. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
  684. <xsl:copy-of select="$system_cache__appinfo:derived.xsd"/>
  685. </system_cache__appinfo:get_all_xsd>
  686. <system_cache__appinfo:get_all_xsd>
  687. <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
  688. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
  689. <xsl:copy-of select="$system_cache__appinfo:XMLSchema11.xsd"/>
  690. </system_cache__appinfo:get_all_xsd>
  691. <system_cache__appinfo:get_all_xsd>
  692. <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://www.w3.org/1999/XSL/Transform'"/>
  693. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://www.w3.org/1999/XSL/Transform'"/>
  694. <xsl:copy-of select="$system_cache__appinfo:builtintypes.xsd"/>
  695. </system_cache__appinfo:get_all_xsd>
  696. <system_cache__appinfo:get_all_xsd>
  697. <xsl:attribute name="system_cache__appinfo:document-uri" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
  698. <xsl:copy-of select="$system_cache__appinfo:p5Type.xsd//@system_cache__appinfo:document-uri"/>
  699. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'http://biuro.biall-net.pl/p5/schema/types'"/>
  700. <xsl:copy-of select="$system_cache__appinfo:p5Type.xsd"/>
  701. </system_cache__appinfo:get_all_xsd>
  702. <system_cache__appinfo:get_all_xsd>
  703. <xsl:attribute name="system_cache__appinfo:document-uri" select="'https://biuro.biall-net.pl/wfs'"/>
  704. <xsl:copy-of select="$system_cache__appinfo:p5.xsd//@system_cache__appinfo:document-uri"/>
  705. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="'https://biuro.biall-net.pl/wfs'"/>
  706. <xsl:copy-of select="$system_cache__appinfo:p5.xsd"/>
  707. </system_cache__appinfo:get_all_xsd>
  708. <xsl:choose>
  709. <xsl:when test="string-length($ignore_SVG.xsd) &gt; 0"></xsl:when>
  710. <xsl:otherwise>
  711. <system_cache__appinfo:get_all_xsd>
  712. <xsl:copy-of select="$system_cache__appinfo:SVG.xsd//@system_cache__appinfo:document-uri"/>
  713. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:SVG.xsd//@targetNamespace"/>
  714. <xsl:copy-of select="$system_cache__appinfo:SVG.xsd"/>
  715. </system_cache__appinfo:get_all_xsd>
  716. </xsl:otherwise>
  717. </xsl:choose>
  718. <system_cache__appinfo:get_all_xsd>
  719. <xsl:copy-of select="$system_cache__appinfo:xlink.xsd//@system_cache__appinfo:document-uri"/>
  720. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:xlink.xsd//@targetNamespace"/>
  721. <xsl:copy-of select="$system_cache__appinfo:xlink.xsd"/>
  722. </system_cache__appinfo:get_all_xsd>
  723. <system_cache__appinfo:get_all_xsd>
  724. <xsl:copy-of select="$system_cache__appinfo:xml.xsd//@system_cache__appinfo:document-uri"/>
  725. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="$system_cache__appinfo:xml.xsd//@targetNamespace"/>
  726. <xsl:copy-of select="$system_cache__appinfo:xml.xsd"/>
  727. </system_cache__appinfo:get_all_xsd>
  728. </system_cache__appinfo:get_all_xsd_list>
  729. </xsl:variable>
  730. <!--<xsl:result-document href="{concat('../default_db.instance.xml/transformed/',$element-filename,'.xml')}">
  731. <xsl:copy-of select="$procesy5_system_schema"/>
  732. </xsl:result-document>-->
  733. <xsl:copy-of select="$procesy5_system_schema"/>
  734. </xsl:otherwise>
  735. </xsl:choose>
  736. </xsl:template>
  737. <!--TODO DISABLED TEMPORARY - IF IS USED? <xsl:template name="system_cache__appinfo:vrtfNamespaces"><!-\- consider namespaces for get_all_xsd_external_schema -\->
  738. <xsl:variable name="procesy5_system_schema">
  739. <xsl:call-template name="system_cache__appinfo:get_all_xsd">
  740. <xsl:with-param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
  741. <xsl:with-param name="cache" select="'read'"/>
  742. </xsl:call-template>
  743. </xsl:variable>
  744. <system_cache__appinfo:vrtfNamespaces>
  745. <xsl:for-each select="$procesy5_system_schema/system_cache__appinfo:get_all_xsd_list/system_cache__appinfo:get_all_xsd/schema/namespace::node()"
  746. xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  747. <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
  748. </xsl:for-each>
  749. </system_cache__appinfo:vrtfNamespaces>
  750. </xsl:template>-->
  751. <!--<xsl:template name="system_cache__appinfo:vrtfNamespaces_external_schema">
  752. <xsl:variable name="procesy5_system_schema">
  753. <xsl:call-template name="system_cache__appinfo:get_all_xsd">
  754. <xsl:with-param name="path2collection" select="$procesy5_system_schema_collection_dir"/>
  755. <xsl:with-param name="cache" select="'read'"/>
  756. </xsl:call-template>
  757. </xsl:variable>
  758. <system_cache__appinfo:vrtfNamespaces_external_schema>
  759. <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()"
  760. xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  761. <ns element="{name(..)}" prefix="{name()}" uri="{.}"/>
  762. </xsl:for-each>
  763. </system_cache__appinfo:vrtfNamespaces_external_schema>
  764. </xsl:template>-->
  765. <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:vrtfNamespaces">
  766. <system_cache__appinfo:vrtfNamespaces>
  767. <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()"
  768. xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  769. <ns element="{name(..)}" prefix="{name()}" uri="{.}" debug="l.849"
  770. system_cache__appinfo:document-uri="{../../@system_cache__appinfo:document-uri}"/>
  771. </xsl:for-each>
  772. <xsl:for-each select="//system_cache__appinfo:get_all_xsd_default_db/schema"
  773. xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  774. <xsl:variable name="targetNamespace" select="@targetNamespace"/>
  775. <xsl:choose>
  776. <xsl:when test="namespace::node()=$targetNamespace">
  777. <xsl:message>#701-A OK $targetNamespace <xsl:value-of select="$targetNamespace"/> has declared prefix </xsl:message>
  778. </xsl:when>
  779. <xsl:otherwise>
  780. <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>
  781. <ns element="{name(.)}"
  782. debug="l.862"
  783. prefix="{system_cache__appinfo:object_install_se_ant_object.detect_external_targetNamespace($targetNamespace)}"
  784. uri="{$targetNamespace}"
  785. system_cache__appinfo:document-uri="{../@system_cache__appinfo:document-uri}"/>
  786. </xsl:otherwise>
  787. </xsl:choose>
  788. </xsl:for-each>
  789. </system_cache__appinfo:vrtfNamespaces>
  790. </xsl:template>
  791. <!--<xsl:function name="system_cache__resources_tree_generate_xsl_required_occurs_raport:element-filename">
  792. <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 -\->
  793. <xsl:param name="parent_type"/>
  794. <xsl:choose>
  795. <xsl:when test="$template_context='system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_element'">
  796. <xsl:value-of select="concat($default_db.instance.xml,'/detect_resource_type/element-',system_cache__appinfo:escape_object_prefix_to_string($parent_type),'.xml')"/>
  797. </xsl:when>
  798. <xsl:when test="$template_context='system_cache__resources_tree_generate_xsl_required_occurs_raport:detect_resource_type.single_complexType'">
  799. <xsl:value-of select="concat($default_db.instance.xml,'/detect_resource_type/complexType-',system_cache__appinfo:escape_object_prefix_to_string($parent_type),'.xml')"/>
  800. </xsl:when>
  801. <xsl:otherwise><xsl:message terminate="yes">#767 unknown type $template_context=<xsl:value-of select="$template_context"/></xsl:message></xsl:otherwise>
  802. </xsl:choose>
  803. </xsl:function>
  804. -->
  805. <xsl:template match="system_cache__appinfo:get_all_xsd_list" mode="system_cache__appinfo:element_complexType">
  806. <xsl:param name="targetNamespace" select="$targetNamespace_DEFAULTS"/>
  807. <system_cache__appinfo:element_complexType xsl:use-attribute-sets="p5ant-interface:xslt.param.get_all_xsd_list">
  808. <xsl:attribute name="default_db.dir" select="$default_db.dir"/>
  809. <xsl:attribute name="WPS_Functions" select="$WPS_Functions"/>
  810. <xsl:attribute name="default_db_xml_cache.public" select="$default_db_xml_cache.public"/>
  811. <xsl:attribute name="external_schema" select="$external_schema"/>
  812. <xsl:attribute name="p5Type.basedir" select="$p5Type.basedir"/>
  813. <xsl:comment>#909 simpleType</xsl:comment>
  814. <xsl:apply-templates mode="#current">
  815. <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'simpleType'" tunnel="yes"/>
  816. </xsl:apply-templates>
  817. <xsl:comment>#913 complexType</xsl:comment>
  818. <xsl:apply-templates mode="#current">
  819. <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'complexType'" tunnel="yes"/>
  820. </xsl:apply-templates>
  821. <xsl:comment>#917 element</xsl:comment>
  822. <xsl:apply-templates mode="#current">
  823. <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'element'" tunnel="yes"/>
  824. </xsl:apply-templates>
  825. <xsl:comment>#917b group</xsl:comment>
  826. <xsl:apply-templates mode="#current">
  827. <xsl:with-param name="system_cache__appinfo:element_complexType.requested" select="'group'" tunnel="yes"/>
  828. </xsl:apply-templates>
  829. </system_cache__appinfo:element_complexType>
  830. </xsl:template>
  831. <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">
  832. <xsl:param name="system_cache__appinfo:element_complexType.requested" required="yes" tunnel="yes"/>
  833. <xsl:apply-templates mode="#current"/>
  834. </xsl:template>
  835. <xsl:template match="system_cache__appinfo:get_all_xsd" mode="system_cache__appinfo:element_complexType">
  836. <xsl:comment>#927 filtered default bypassed <xsl:value-of select="@system_cache__appinfo:document-uri"/></xsl:comment>
  837. </xsl:template>
  838. <xsl:template match="schema" mode="system_cache__appinfo:element_complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  839. <xsl:param name="system_cache__appinfo:element_complexType.requested" required="yes" tunnel="yes"/>
  840. <!-- <xsl:sort select="max( */*/count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))" order="ascending" data-type="number"/>-->
  841. <xsl:variable name="get_all_xsd_236" select="."/>
  842. <!--<xsl:comment>
  843. max1="<xsl:value-of select="max( count(*/*/descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))"/>"
  844. max1=2<xsl:value-of select="max( */*/count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))"/>"
  845. 246:detect_resource_type, przetwarzam schemat:<xsl:value-of select="@system_cache__appinfo:document-uri"/>; $targetNamespace:<xsl:value-of select="$targetNamespace"/>;
  846. @targetNamespace:<xsl:value-of select="schema/@targetNamespace" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>;</xsl:comment>-->
  847. <xsl:variable name="schema_node_144" select="parent::*"/>
  848. <!--<xsl:for-each select="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">--><!--[ @targetNamespace != $targetNamespace ] namespace::node() = $targetNamespace and @targetNamespace='moj_ogrodek' -->
  849. <!--<xsl:sort select="max( */count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ]))+" order="ascending" data-type="number"/>-->
  850. <xsl:message>#239::detect_resource_type przetwarzam schemat:@targetNamespace:<xsl:value-of select="@targetNamespace"/>;</xsl:message>
  851. <!--<xsl:variable name="prefix_83" select="namespace::node()[. = $targetNamespace]/name()"/>-->
  852. <xsl:variable name="targetNamespace_134" select="@targetNamespace"/>
  853. <!--<xsl:variable name="prefix_134" select="namespace::node()[. = $targetNamespace_134][1]/name()"/>--><!-- np. test_objects -->
  854. <xsl:variable name="prefix_134">
  855. <xsl:choose>
  856. <xsl:when test="string-length(namespace::node()[. = $targetNamespace_134][1]/name()) &gt; 0">
  857. <xsl:value-of select="namespace::node()[. = $targetNamespace_134][1]/name()"/>
  858. <xsl:message>#784-A TODO test=<xsl:value-of select="namespace::node()[. = $targetNamespace_134][1]/name()"/>;</xsl:message>
  859. </xsl:when>
  860. <xsl:when test="$schema_node_144/@WPS_Functions">
  861. <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>
  862. <xsl:value-of select="tokenize(../@system_cache__appinfo:document-uri,'/')[ position() = last()]"/>
  863. </xsl:when>
  864. <xsl:when test="contains(../@system_cache__appinfo:document-uri-full,$p5Type.basedir)">
  865. <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>
  866. <xsl:value-of select="system_cache__appinfo:escape_object_prefix_to_string(@targetNamespace)"/>
  867. </xsl:when>
  868. </xsl:choose>
  869. </xsl:variable>
  870. <xsl:if test="not(@targetNamespace) or not( string-length($prefix_134) &gt; 0) ">
  871. <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>
  872. </xsl:if>
  873. <xsl:choose>
  874. <xsl:when test="not($system_cache__appinfo:element_complexType.requested='element')"/>
  875. <xsl:when test="@targetNamespace='http://www.w3.org/2001/XMLSchema'"/>
  876. <xsl:when test="@targetNamespace='http://biuro.biall-net.pl/p5/schema/types'"/>
  877. <xsl:when test="contains(@system_cache__appinfo:document-uri-full,'http://')"/>
  878. <xsl:when test="contains(@system_cache__appinfo:document-uri-full,'https://')"/>
  879. <xsl:otherwise>
  880. <xsl:element name="system_cache__appinfo:object_install_se_ant_object.generate_tables_from_external.get_all_xsd">
  881. <xsl:copy-of select="@*"/>
  882. <xsl:copy-of select=".././@*"/>
  883. </xsl:element>
  884. </xsl:otherwise>
  885. </xsl:choose>
  886. <!--</xsl:for-each>-->
  887. <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">
  888. <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']-->
  889. <xsl:sort select="max( count(descendant-or-self::*[@ref or not(contains(@type,'xs:')) ]))" order="ascending" data-type="number"/>
  890. <xsl:variable name="complexType_or_element_name186">
  891. <xsl:choose>
  892. <xsl:when test="local-name()='element'"><xsl:value-of select="@name"/></xsl:when>
  893. <xsl:when test="local-name()='complexType'"><xsl:value-of select="@name"/></xsl:when>
  894. <xsl:when test="local-name()='simpleType'"><xsl:value-of select="@name"/></xsl:when>
  895. <xsl:when test="local-name()='group'"><xsl:value-of select="@name"/></xsl:when>
  896. <xsl:otherwise><xsl:message terminate="yes">#391 it should work only for element or complexType</xsl:message></xsl:otherwise>
  897. </xsl:choose>
  898. </xsl:variable>
  899. <xsl:comment>157: count(descendant-or-self::*)="<xsl:value-of select="count(descendant-or-self::*)"/>"
  900. count2(descendant-or-self::*)="<xsl:value-of select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>"
  901. buduje plaski obiekt/mape przetwarzania w celu przeszukania relacji @id=<xsl:value-of select="@id"/>; targetNamespace:<xsl:value-of select="$prefix_134"/>;
  902. $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>
  903. <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>
  904. <xsl:choose>
  905. <xsl:when test="local-name()='element'">
  906. <build_cache name="build_element" >
  907. <xsl:attribute name="id" select="@id"/>
  908. <xsl:attribute name="count" select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>
  909. <xsl:attribute name="id.int.rand" select="system_cache__appinfo:id.int.rand(@id)"/>
  910. <xsl:attribute name="system_cache__appinfo:document-uri" select="../.././@system_cache__appinfo:document-uri"/>
  911. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="../.././@system_cache__appinfo:document-uri-full"/>
  912. <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)"/>
  913. <xsl:attribute name="complexType_or_element_name" select="$complexType_or_element_name186"/>
  914. <xsl:attribute name="p5opr:element-filename" select="p5opr:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
  915. <xsl:attribute name="system_cache__appinfo:path" select="concat(../@targetNamespace,'/',$complexType_or_element_name186)"/>
  916. <xsl:copy-of select="@system_cache__appinfo:path.2863.len.limit"/>
  917. <!--<xsl:attribute name="system_cache__appinfo:element-filename" select="system_cache__appinfo:element-filename()"/>-->
  918. <with-param name="element" select="{$prefix_134}:{$complexType_or_element_name186}"/>
  919. <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>
  920. <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>
  921. <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>
  922. <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>
  923. <system_cache__appinfo:targetNamespace><xsl:value-of select="../@targetNamespace"/></system_cache__appinfo:targetNamespace>
  924. <system_cache__appinfo:name><xsl:value-of select="@name"/></system_cache__appinfo:name>
  925. <system_cache__appinfo:prefix><xsl:value-of select="$prefix_134"/></system_cache__appinfo:prefix>
  926. <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>
  927. <!--<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>-->
  928. </build_cache>
  929. </xsl:when>
  930. <xsl:when test="local-name()='complexType'">
  931. <build_cache name="build_complexType" >
  932. <xsl:attribute name="id" select="@id"/>
  933. <xsl:attribute name="count" select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>
  934. <xsl:attribute name="id.int.rand" select="system_cache__appinfo:id.int.rand(@id)"/>
  935. <!--<xsl:message>#808.1.DEBUG ok</xsl:message>-->
  936. <xsl:attribute name="system_cache__appinfo:document-uri" select="../.././@system_cache__appinfo:document-uri"/>
  937. <!--<xsl:message>#808.2.DEBUG ok</xsl:message>-->
  938. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="../.././@system_cache__appinfo:document-uri-full"/>
  939. <!--<xsl:message>#808.3.DEBUG ok</xsl:message>-->
  940. <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)"/>
  941. <!--<xsl:message>#808.4.DEBUG ok</xsl:message>-->
  942. <xsl:attribute name="complexType_or_element_name" select="$complexType_or_element_name186"/>
  943. <!--<xsl:message>#808.5.DEBUG ok</xsl:message>-->
  944. <xsl:attribute name="p5opr:element-filename" select="p5opr:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
  945. <!--<xsl:message>#808.6.DEBUG ok</xsl:message>-->
  946. <xsl:attribute name="system_cache__appinfo:path" select="concat(../@targetNamespace,'/',$complexType_or_element_name186)"/>
  947. <xsl:copy-of select="@system_cache__appinfo:path.2863.len.limit"/>
  948. <with-param name="complexType"
  949. select="{$prefix_134}:{$complexType_or_element_name186}"/>
  950. <!--<xsl:message>#808.7.DEBUG ok</xsl:message>-->
  951. <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>
  952. <!--<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>-->
  953. <!--<xsl:message>#808.8.DEBUG ok</xsl:message>-->
  954. <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>
  955. <!--<xsl:message>#808.9.DEBUG ok</xsl:message>-->
  956. <system_cache__appinfo:targetNamespace><xsl:value-of select="../@targetNamespace"/></system_cache__appinfo:targetNamespace>
  957. <system_cache__appinfo:name><xsl:value-of select="@name"/></system_cache__appinfo:name>
  958. <system_cache__appinfo:prefix><xsl:value-of select="$prefix_134"/></system_cache__appinfo:prefix>
  959. <!--<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>-->
  960. </build_cache>
  961. </xsl:when>
  962. <xsl:when test="local-name()='simpleType'">
  963. <build_cache name="build_complexType__simpleType" >
  964. <xsl:attribute name="id" select="@id"/>
  965. <xsl:attribute name="count" select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>
  966. <xsl:attribute name="id.int.rand" select="system_cache__appinfo:id.int.rand(@id)"/>
  967. <xsl:attribute name="system_cache__appinfo:document-uri" select="../.././@system_cache__appinfo:document-uri"/>
  968. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="../.././@system_cache__appinfo:document-uri-full"/>
  969. <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)"/>
  970. <xsl:attribute name="complexType_or_element_name" select="$complexType_or_element_name186"/>
  971. <xsl:attribute name="p5opr:element-filename" select="p5opr:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
  972. <xsl:attribute name="system_cache__appinfo:path" select="concat(../@targetNamespace,'/',$complexType_or_element_name186)"/>
  973. <xsl:attribute name="debug.targetNamespace" select="parent::*/@targetNamespace "/>
  974. <!--<xsl:attribute name="debug.prefix" select="parent::*/namespace::*[ . = @targetNamespace ]/name()"/>-->
  975. <xsl:attribute name="debug.prefix" select="parent::*/namespace::*[ . = ../@targetNamespace ]/name()"/>
  976. <xsl:attribute name="debug.prefix2" select="parent::*/namespace::*[ . = ../@targetNamespace and not(name()='') ]/name()"/>
  977. <xsl:copy-of select="@system_cache__appinfo:path.2863.len.limit"/>
  978. <!--<xsl:attribute name="system_cache__appinfo:element-filename" select="system_cache__appinfo:element-filename()"/>-->
  979. <!--<with-param name="element" select="{$prefix_134}:{$complexType_or_element_name186}"/>-->
  980. <xsl:choose>
  981. <xsl:when test="not(parent::*/namespace::*[ . = ../@targetNamespace and not(name()='') ])">
  982. <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>
  983. </xsl:when>
  984. </xsl:choose>
  985. <with-param name="element" select="{parent::*/namespace::*[ . = ../@targetNamespace and not(name()='')]/name()}:{$complexType_or_element_name186}"/>
  986. <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>
  987. <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>
  988. <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>
  989. <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>
  990. <system_cache__appinfo:targetNamespace><xsl:value-of select="../@targetNamespace"/></system_cache__appinfo:targetNamespace>
  991. <system_cache__appinfo:name><xsl:value-of select="@name"/></system_cache__appinfo:name>
  992. <system_cache__appinfo:prefix><xsl:value-of select="$prefix_134"/></system_cache__appinfo:prefix>
  993. <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>
  994. <!--<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>-->
  995. </build_cache>
  996. </xsl:when>
  997. <xsl:when test="local-name()='group'">
  998. <build_cache name="build_complexType__group" >
  999. <xsl:attribute name="id" select="@id"/>
  1000. <xsl:attribute name="count" select="count(descendant-or-self::*[ @ref or not(contains(@type,'xs:')) ])"/>
  1001. <xsl:attribute name="id.int.rand" select="system_cache__appinfo:id.int.rand(@id)"/>
  1002. <xsl:attribute name="system_cache__appinfo:document-uri" select="../.././@system_cache__appinfo:document-uri"/>
  1003. <xsl:attribute name="system_cache__appinfo:document-uri-full" select="../.././@system_cache__appinfo:document-uri-full"/>
  1004. <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)"/>
  1005. <xsl:attribute name="complexType_or_element_name" select="$complexType_or_element_name186"/>
  1006. <xsl:attribute name="p5opr:element-filename" select="p5opr:element-filename(../.././@system_cache__appinfo:document-uri, .././@targetNamespace,local-name(),@name)"/>
  1007. <xsl:attribute name="system_cache__appinfo:path" select="concat(../@targetNamespace,'/',$complexType_or_element_name186)"/>
  1008. <xsl:attribute name="debug.targetNamespace" select="parent::*/@targetNamespace "/>
  1009. <!--<xsl:attribute name="debug.prefix" select="parent::*/namespace::*[ . = @targetNamespace ]/name()"/>-->
  1010. <xsl:attribute name="debug.prefix" select="parent::*/namespace::*[ . = ../@targetNamespace ]/name()"/>
  1011. <xsl:attribute name="debug.prefix2" select="parent::*/namespace::*[ . = ../@targetNamespace and not(name()='') ]/name()"/>
  1012. <xsl:copy-of select="@system_cache__appinfo:path.2863.len.limit"/>
  1013. <!--<xsl:attribute name="system_cache__appinfo:element-filename" select="system_cache__appinfo:element-filename()"/>-->
  1014. <!--<with-param name="element" select="{$prefix_134}:{$complexType_or_element_name186}"/>-->
  1015. <xsl:choose>
  1016. <xsl:when test="not(parent::*/namespace::*[ . = ../@targetNamespace and not(name()='') ])">
  1017. <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>
  1018. </xsl:when>
  1019. </xsl:choose>
  1020. <with-param name="element" select="{parent::*/namespace::*[ . = ../@targetNamespace and not(name()='')]/name()}:{$complexType_or_element_name186}"/>
  1021. <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>
  1022. <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>
  1023. <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>
  1024. <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>
  1025. <system_cache__appinfo:targetNamespace><xsl:value-of select="../@targetNamespace"/></system_cache__appinfo:targetNamespace>
  1026. <system_cache__appinfo:name><xsl:value-of select="@name"/></system_cache__appinfo:name>
  1027. <system_cache__appinfo:prefix><xsl:value-of select="$prefix_134"/></system_cache__appinfo:prefix>
  1028. <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>
  1029. <!--<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>-->
  1030. </build_cache>
  1031. </xsl:when>
  1032. </xsl:choose>
  1033. </xsl:for-each>
  1034. </xsl:if>
  1035. </xsl:template>
  1036. <!-- do aktualizowania pozycji w schemache-->
  1037. <xsl:template name="system_cache__appinfo:position">
  1038. <xsl:param name="xml"/>
  1039. <xsl:for-each select="$xml/*">
  1040. <xsl:if test="name()">
  1041. <xsl:element name="{name()}">
  1042. <xsl:attribute name="system_cache__appinfo:position" select="position()"/>
  1043. <xsl:apply-templates mode="system_cache__appinfo:position" select="@*"/>
  1044. <xsl:call-template name="system_cache__appinfo:position">
  1045. <xsl:with-param name="xml" select="."/>
  1046. </xsl:call-template>
  1047. </xsl:element>
  1048. </xsl:if>
  1049. </xsl:for-each>
  1050. </xsl:template>
  1051. <xsl:template match="@*" mode="system_cache__appinfo:position">
  1052. <xsl:attribute name="{name()}" select="."/>
  1053. </xsl:template>
  1054. <xsl:template match="text()" mode="system_cache__appinfo:position"/>
  1055. <xsl:template match="comment()" mode="system_cache__appinfo:position"/>
  1056. </xsl:stylesheet>