p5dkp.entities-generated.xsl 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
  5. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  6. xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
  7. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  8. xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
  9. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  10. xmlns:p5xsda="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xsd_asserts/p5xsda.xsd"
  11. xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/"
  12. xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
  13. xmlns:p5dkp.entities-generated="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-generated.xsd"
  14. xmlns:p5dkp.entities="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.xsd"
  15. xmlns:p5dkp-er="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-relations.xsd"
  16. xmlns:p5frc="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/flat_relation_cache/p5frc.xsd"
  17. exclude-result-prefixes="xs ditaarch"
  18. version="2.0">
  19. <xsl:import href="p5dkp.param.xsl"/>
  20. <xsl:output indent="yes" method="xml" exclude-result-prefixes="ditaarch"/>
  21. <!--<xsl:output indent="yes" method="xml" standalone="no" doctype-public="-//OASIS//DTD DITA Glossary Group//EN" doctype-system="glossgroup.dtd"/>-->
  22. <xsl:strip-space elements="*"/>
  23. <xsl:param name="p5dkp.entities-generated:basedir" />
  24. <xsl:param name="p5dkp.entities-generated:debug"/>
  25. <xsl:param name="p5dkp:xsd" required="yes"/>
  26. <xsl:param name="p5dkp.entities:xsd" required="yes"/>
  27. <xsl:param name="p5dkp.repository" required="yes"/> <!-- will output there -->
  28. <xsl:param name="p5dkp.entities-generated:xsd" required="yes"/>
  29. <xsl:param name="p5dkp.entities-generated.xsd.p5frc.build_complexType.xml" required="yes"/>
  30. <xsl:param name="p5dkp-er:xsd" required="yes"/>
  31. <xsl:param name="p5dkp-er:prefix.prefix" select="'p5dkp-er.'"/>
  32. <xsl:param name="p5dkp-er:file.prefix" select="'p5dkp-er.'"/>
  33. <xsl:param name="p5dkp-er:targetNamespace.fragment" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.'"/>
  34. <xsl:param name="p5dkp.entities-generated:entity.name.prefix" select="'entities__x3A__'"/>
  35. <!--<xsl:param name="p5dkp.entities:prefix" select="'p5dkp.entities'"/>--> <!-- to replace to local -->
  36. <!--<xsl:param name="p5dkp.entities:targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.xsd'"/>-->
  37. <xsl:include href="p5dkp.entities.param.xsl"/>
  38. <xsl:include href="p5dkp.entities-generated.functions.xsl"/>
  39. <xsl:include href="../flat_relation_cache/p5frc.build_complexType.xsl"/>
  40. <!-- template to generate from p5dkp.entities-relations.xsd
  41. p5dkp.entities-generated.xsd (like p5dkp:xsd )
  42. with flat_relation_cache and asserts calculations to then follow
  43. -->
  44. <xsl:template mode="p5dkp.entities-generated:p5frc.build_complexType.xmlp5frc.build_complexType.xml" match="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  45. <xsl:copy copy-namespaces="yes">
  46. <xsl:copy-of select="@vc:minVersion"/>
  47. <xsl:copy-of select="@elementFormDefault"/>
  48. <xsl:attribute name="targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-generated.xsd'"/>
  49. <xsl:if test="number($p5dkp.entities-generated:debug) &gt; 3"><xsl:message>#44 match mode="p5dkp.entities-generated:xsd" match="schema" </xsl:message></xsl:if>
  50. <xsl:apply-templates mode="p5frc:build_complexType" select="*"/>
  51. </xsl:copy>
  52. </xsl:template>
  53. <xsl:template mode="p5dkp.entities-generated:xsd" match="schema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  54. <xsl:copy copy-namespaces="yes">
  55. <!--<xsl:copy-of select="namespace::node()/*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>-->
  56. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.namespaces" select="complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  57. <xsl:with-param name="p5dkp.entities-generated:targetNamespace" select="'xxxxx'"/>
  58. </xsl:apply-templates>
  59. <xsl:copy-of select="@vc:minVersion"/>
  60. <xsl:copy-of select="@elementFormDefault"/>
  61. <xsl:attribute name="targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities-generated.xsd'"/>
  62. <xsl:if test="number($p5dkp.entities-generated:debug) &gt; 3"><xsl:message>#63 match mode="p5dkp.entities-generated:xsd" match="schema" </xsl:message></xsl:if>
  63. <xsl:comment>#74 testing namespaces</xsl:comment>
  64. <!--<xs:import
  65. namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.xsd"
  66. schemaLocation="{$p5dkp.entities:xsd}"/>-->
  67. <!--<xsl:copy-of select="*" copy-namespaces="no"/>-->
  68. <xsl:apply-templates mode="p5dkp.entities-generated:xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  69. <xsl:comment>#84 eof copy=* ?</xsl:comment>
  70. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity"/>
  71. </xsl:copy>
  72. </xsl:template>
  73. <xsl:template mode="p5dkp.entities-generated:xsd" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  74. <xsl:copy copy-namespaces="no">
  75. <xsl:copy-of select="@*"/>
  76. <xsl:apply-templates mode="#current"/>
  77. </xsl:copy>
  78. </xsl:template>
  79. <xsl:template mode="p5dkp.entities-generated:xsd" match="group[ parent::group ]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  80. <xsl:message>#100 mode="p5dkp.entities-generated:xsd" ignored=<xsl:value-of select="name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>; @* = <xsl:copy-of select="@*" copy-namespaces="no"/></xsl:message>
  81. </xsl:template>
  82. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity" match="*|text()|comment()"/>
  83. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="complexType">
  84. <xsl:variable name="p5dkp.entities-generated:p5dkp-er.entity.result-document" select="p5dkp.entities-generated:p5dkp-er.entity.result-document.from.complexType(.)"/>
  85. <xsl:variable name="p5dkp.entities-generated:p5dkp-er.entity">
  86. <p5dkp.entities-generated:p5dkp-er.entity>
  87. <xsl:attribute name="p5dkp.entities-generated:p5dkp-er.entity.result-document" select="$p5dkp.entities-generated:p5dkp-er.entity.result-document" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  88. <xsl:element name="xs:schema">
  89. <!--<xsl:namespace name="{p5dkp.entities-generated:p5dkp-er.entity.prefix.from.complexType(.)}" select="p5dkp.entities-generated:p5dkp-er.entity.targetNamespace.from.complexType(.)"/>-->
  90. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.namespaces" select="root()/schema/complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  91. <xsl:with-param name="p5dkp.entities-generated:targetNamespace" select="p5dkp.entities-generated:p5dkp-er.entity.targetNamespace.from.complexType(.)"/>
  92. </xsl:apply-templates>
  93. <xsl:copy-of select="doc($p5dkp.entities:xsd)/schema/namespace::*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  94. <xsl:copy-of select="root()/schema/@vc:minVersion" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  95. <xsl:copy-of select="root()/schema/@elementFormDefault" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  96. <xsl:attribute name="targetNamespace" select="p5dkp.entities-generated:p5dkp-er.entity.targetNamespace.from.complexType(.)"/>
  97. <xs:annotation>
  98. <xs:documentation>#126 generated by p5dkp.entities-generated:p5dkp-er.entity</xs:documentation>
  99. </xs:annotation>
  100. <xs:import
  101. namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.entities.xsd"
  102. schemaLocation="{p5frc:try.import.fix.schemaLocation.path.nodoc($p5dkp.entities:xsd,$p5dkp.repository)}"/>
  103. <xsl:comment>#115 lower mode="p5dkp.entities-generated:p5dkp.entities.import" select="doc(p5frc:try.import.fix.schemaLocation.path.nodoc($p5dkp.entities:xsd,$p5dkp.repository))/schema/import" </xsl:comment>
  104. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp.entities.import" select="doc(p5frc:try.import.fix.schemaLocation.path.nodoc($p5dkp.entities:xsd,$p5dkp.repository))/schema/import" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  105. <xsl:comment>#114 lower mode="p5dkp.entities-generated:p5dkp-er.entity.import" select="root()/schema/complexType" </xsl:comment>
  106. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.import" select="root()/schema/complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  107. <xsl:with-param name="p5dkp.entities-generated:targetNamespace" select="p5dkp.entities-generated:p5dkp-er.entity.targetNamespace.from.complexType(.)"/>
  108. </xsl:apply-templates>
  109. <xs:complexType name="entities">
  110. <xs:complexContent>
  111. <xs:extension base="p5dkp.entities:entities"/>
  112. </xs:complexContent>
  113. </xs:complexType>
  114. <xs:complexType name="{@name}">
  115. <xs:complexContent>
  116. <xs:extension base="p5dkp.entities:entities">
  117. <xs:sequence>
  118. <xs:group ref="{$p5dkp-er:prefix.prefix}{@name}:{@name}"/>
  119. </xs:sequence>
  120. <xs:attribute fixed="ditamap" name="format" type="xs:string"/>
  121. <xs:attribute name="keyref" type="xs:string"/>
  122. <xs:attribute name="keys" type="xs:string"/>
  123. <xs:attribute name="keys.keyscope" type="xs:string"/>
  124. </xs:extension>
  125. </xs:complexContent>
  126. </xs:complexType>
  127. <xsl:comment>#165 ref to local group p5dkp.entities-generated:p5dkp-er.entity.group</xsl:comment>
  128. <xs:group name="{@name}">
  129. <xs:sequence>
  130. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.group" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  131. <xsl:with-param name="p5dkp.entities-generated:entity" select="p5dkp.entities-generated:p5dkp-er.entity.from.complexType(.)"/>
  132. </xsl:apply-templates>
  133. </xs:sequence>
  134. </xs:group>
  135. <xsl:choose>
  136. <!--/xs:schema/xs:group[1]/sequence/group/group/sequence-->
  137. <xsl:when test="root()/schema/group[@name='entities']/sequence/group/group/sequence/*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"><xsl:message>#171 ok found p5dkp.entities-generated:p5dkp-er.entity.group.entities root()/schema/group[@name='entities']/group/group/sequence</xsl:message>
  138. <xsl:comment>#175 lower: local group name and </xsl:comment>
  139. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities" select="root()/schema/group[@name='entities']/sequence/group/group/sequence/*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  140. <xsl:with-param name="p5dkp.entities-generated:entity" select="p5dkp.entities-generated:p5dkp-er.entity.from.complexType(.)"/>
  141. </xsl:apply-templates>
  142. <xsl:comment>#175-B lower: local complexTypes local </xsl:comment> <!--/schema/group /sequence/group/group/sequence/group/group/sequence/group/group/sequence/element-->
  143. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" select="root()/schema/group[@name='entities']/sequence/group/group/sequence" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"> <!-- //element bylo -->
  144. <xsl:with-param name="p5dkp.entities-generated:entity" select="p5dkp.entities-generated:p5dkp-er.entity.from.complexType(.)"/>
  145. </xsl:apply-templates>
  146. </xsl:when>
  147. <xsl:otherwise><xsl:message terminate="yes">#171-B ERROR NOT found p5dkp.entities-generated:p5dkp-er.entity.group.entities root()/schema/group[@name='entities']/sequence/group/group/sequence/*
  148. <xsl:copy-of select="root()/schema/group[@name='entities']/sequence" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" copy-namespaces="no"></xsl:copy-of>
  149. </xsl:message></xsl:otherwise>
  150. </xsl:choose>
  151. </xsl:element>
  152. </p5dkp.entities-generated:p5dkp-er.entity>
  153. </xsl:variable>
  154. <!--<xsl:copy-of select="$p5dkp.entities-generated:p5dkp-er.entity"/>-->
  155. <xsl:message>#194 result-document href="{$p5dkp.entities-generated:p5dkp-er.entity.result-document} = <xsl:value-of select="$p5dkp.entities-generated:p5dkp-er.entity.result-document"/>;</xsl:message>
  156. <xsl:result-document href="{$p5dkp.entities-generated:p5dkp-er.entity.result-document}">
  157. <xsl:copy-of select="$p5dkp.entities-generated:p5dkp-er.entity/p5dkp.entities-generated:p5dkp-er.entity/*"/>
  158. </xsl:result-document>
  159. </xsl:template>
  160. <!--<xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities" xpath-default-namespace="" match="*">
  161. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  162. <xsl:comment>#205 mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities" match="*" xpath-default-namespace="" </xsl:comment>
  163. <xsl:copy copy-namespaces="no">
  164. <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  165. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
  166. </xsl:apply-templates>
  167. </xsl:copy>
  168. </xsl:template>-->
  169. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" match="element[@name]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  170. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  171. <xsl:comment>#2322 mode="p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" match="group" <xsl:copy-of select="@*"/> ; , next/* = <xsl:value-of select="*/name()" xpath-default-namespace=""/></xsl:comment>
  172. <xs:complexType>
  173. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" select="@name" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  174. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  175. </xsl:apply-templates>
  176. <xs:complexContent>
  177. <xs:extension base="{@type}"/>
  178. </xs:complexContent>
  179. </xs:complexType>
  180. </xsl:template>
  181. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  182. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  183. <xsl:comment>#224 igroned element match="*" name()= <xsl:value-of select="name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/> ; <xsl:copy-of select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/></xsl:comment>
  184. <xsl:apply-templates mode="#current">
  185. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
  186. </xsl:apply-templates>
  187. </xsl:template>
  188. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" match="element[@ref]" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  189. <xsl:comment>#245 igroned element @ref = <xsl:value-of select="@ref"/></xsl:comment>
  190. </xsl:template>
  191. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities" match="group" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  192. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  193. <xsl:comment>#202 mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities" match="group" <xsl:copy-of select="@*"/> ; <xsl:copy-of select="@*" xpath-default-namespace=""/> , next/* = <xsl:value-of select="*/name()" xpath-default-namespace=""/></xsl:comment>
  194. <xsl:copy copy-namespaces="no">
  195. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.ref" select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  196. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  197. </xsl:apply-templates>
  198. <!--<xsl:attribute name="name" select="sub"/>-->
  199. <xsl:call-template name="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  200. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  201. </xsl:call-template>
  202. </xsl:copy>
  203. </xsl:template>
  204. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="text()|comment()"/>
  205. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="text()|comment()">
  206. <!--<xsl:copy-of select="." copy-namespaces="no"/>-->
  207. </xsl:template>
  208. <xsl:template name="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  209. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  210. <xs:sequence>
  211. <xsl:apply-templates mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"> <!-- select="*/*" todo testin 2018-06 -->
  212. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  213. </xsl:apply-templates>
  214. </xs:sequence>
  215. </xsl:template>
  216. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="*">
  217. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  218. <xsl:comment>#191 mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities" match="*"
  219. p5dkp.entities-generated:p5dkp-er.entity.prefix.from.entity(<xsl:value-of select="@type"/>) $$p5dkp.entities-generated:entity = <xsl:value-of select="$p5dkp.entities-generated:entity"/>;
  220. <!--p5dkp.entities-generated:fix.entity.type(.,$p5dkp.entities-generated:entity) = <xsl:value-of select="p5dkp.entities-generated:fix.entity.type(.,$p5dkp.entities-generated:entity)"/>-->
  221. p5dkp.entities-generated:p5dkp-er.entity.prefix.from.entity($p5dkp.entities-generated:entity) = <xsl:value-of select="p5dkp.entities-generated:p5dkp-er.entity.prefix.from.entity($p5dkp.entities-generated:entity)"/>
  222. </xsl:comment>
  223. <xsl:copy copy-namespaces="no">
  224. <xsl:apply-templates mode="#current" select="@*">
  225. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  226. </xsl:apply-templates>
  227. <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  228. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
  229. </xsl:apply-templates>
  230. </xsl:copy>
  231. </xsl:template>
  232. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="annotation|documentation"/>
  233. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema" match="group|sequence">
  234. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  235. <xsl:comment>
  236. #249 mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities" match="group|sequence|annotation|documentation" - skipping name()=<xsl:value-of select="name()"/> /@ = <xsl:copy-of select="@*" copy-namespaces="no"/> </xsl:comment>
  237. <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  238. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
  239. </xsl:apply-templates>
  240. </xsl:template>
  241. <xsl:template match="@*" mode="p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  242. <xsl:copy-of select="." copy-namespaces="no"/>
  243. </xsl:template>
  244. <xsl:template match="@name" mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child p5dkp.entities-generated:p5dkp-er.entity.complexTypes.entities" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  245. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  246. <xsl:attribute name="name" select="p5dkp.entities-generated:fix.entity.name(.,$p5dkp.entities-generated:entity)"/>
  247. </xsl:template>
  248. <xsl:template match="@minOccurs" mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child p5dkp.entities-generated:p5dkp-er.entity.group.entities.ref" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  249. <xsl:choose>
  250. <xsl:when test="../local-name()='group'"/>
  251. <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
  252. </xsl:choose>
  253. </xsl:template>
  254. <xsl:template match="@*" mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  255. <xsl:copy-of select="." copy-namespaces="no"/>
  256. </xsl:template>
  257. <xsl:template match="@type" mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  258. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  259. <xsl:attribute name="type" select="p5dkp.entities-generated:fix.entity.type(.,$p5dkp.entities-generated:entity)"/>
  260. </xsl:template>
  261. <xsl:template match="@*" mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.ref" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  262. <xsl:copy-of select="." copy-namespaces="no"/>
  263. </xsl:template>
  264. <xsl:template match="@ref" mode="p5dkp.entities-generated:p5dkp-er.entity.group.entities.ref" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  265. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  266. <xsl:attribute name="name" select="substring-after(.,':')"/>
  267. </xsl:template>
  268. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group" match="*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  269. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  270. <xsl:apply-templates mode="#current">
  271. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
  272. </xsl:apply-templates>
  273. </xsl:template>
  274. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group" match="group" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  275. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  276. <!--<xsl:apply-templates mode=""></xsl:apply-templates>-->
  277. <xsl:comment>#234 mode="p5dkp.entities-generated:p5dkp-er.entity.group" match="group" </xsl:comment>
  278. <xsl:copy copy-namespaces="no">
  279. <xsl:copy-of select="@*"/>
  280. <!--<xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  281. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
  282. </xsl:apply-templates>-->
  283. </xsl:copy>
  284. </xsl:template>
  285. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group" match="element" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  286. <xsl:param name="p5dkp.entities-generated:entity" required="yes"/>
  287. <xsl:apply-templates mode="#current">
  288. <xsl:with-param name="p5dkp.entities-generated:entity" select="$p5dkp.entities-generated:entity"/>
  289. </xsl:apply-templates>
  290. </xsl:template>
  291. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.group" match="text()|comment()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  292. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.import p5dkp.entities-generated:p5dkp-er.entity.namespaces" match="*|comment()|text()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  293. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.namespaces" match="complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  294. <xsl:param name="p5dkp.entities-generated:targetNamespace" required="yes"/>
  295. <xsl:namespace name="{p5dkp.entities-generated:p5dkp-er.entity.prefix.from.complexType(.)}" select="p5dkp.entities-generated:p5dkp-er.entity.targetNamespace.from.complexType(.)"/>
  296. </xsl:template>
  297. <xsl:template mode="p5dkp.entities-generated:p5dkp-er.entity.import" match="complexType" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  298. <xsl:param name="p5dkp.entities-generated:targetNamespace" required="yes"/>
  299. <xsl:choose>
  300. <xsl:when test="$p5dkp.entities-generated:targetNamespace = p5dkp.entities-generated:p5dkp-er.entity.targetNamespace.from.complexType(.)">
  301. <xsl:comment>#384 ignored same $p5dkp.entities-generated:targetNamespace = <xsl:value-of select="$p5dkp.entities-generated:targetNamespace"/></xsl:comment>
  302. </xsl:when>
  303. <xsl:otherwise>
  304. <xs:import
  305. namespace="{p5dkp.entities-generated:p5dkp-er.entity.targetNamespace.from.complexType(.)}"
  306. schemaLocation="{p5frc:try.import.fix.schemaLocation.path.nodoc(p5dkp.entities-generated:p5dkp-er.entity.schemaLocation.from.complexType(.),$p5dkp.repository)}"/>
  307. </xsl:otherwise>
  308. </xsl:choose>
  309. </xsl:template>
  310. <xsl:template mode="p5dkp.entities-generated:p5dkp.entities.import" match="import" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  311. <xsl:copy copy-namespaces="no">
  312. <xsl:copy-of select="@namespace"/>
  313. <xsl:attribute name="schemaLocation" select="p5frc:try.import.fix.schemaLocation.path.nodoc(@schemaLocation,$p5dkp:basedir)"/>
  314. <!--<xsl:attribute name="schemaLocation" select="concat($p5dkp.repository,'/',@schemaLocation)"/>-->
  315. </xsl:copy>
  316. </xsl:template>
  317. </xsl:stylesheet>