documentation_generator.xsl 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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. xmlns:p5dg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd"
  5. xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
  6. xmlns:SystemObjects__x3A__File="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/File.xsd"
  7. xmlns:p5ant-interface-resp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd"
  8. xmlns:p5ant="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/ant/ant.xsd"
  9. xmlns:object_merge_ant_object="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_merge_ant_object.xsd"
  10. exclude-result-prefixes="xs"
  11. version="2.0">
  12. <xsl:output indent="yes"/>
  13. <xsl:strip-space elements="*"/>
  14. <!--<xsl:import-schema schema-location="repository/p5dg.documentation.files.antstructure-resp.xsd" namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd"/>-->
  15. <xsl:param name="p5build_SE.build" required="yes"/>
  16. <xsl:param name="p5dg.repository.dita" required="yes"/>
  17. <xsl:param name="p5dg.temp" required="yes"/>
  18. <xsl:param name="p5dg.repository" required="yes"/>
  19. <xsl:param name="p5dg.documentation.files.index.root_dir" required="yes"/>
  20. <xsl:param name="p5dg.documentation.files.index.excludes.regex" required="yes"/>
  21. <!--<xsl:param name="p5ant.xsl" required="yes"/>-->
  22. <xsl:include href="../ant/p5ant.xsl"/>
  23. <xsl:function name="p5dg:filepath.dir">
  24. <xsl:param name="p5dg:filepath"/>
  25. <xsl:for-each select="tokenize($p5dg:filepath,'/')[ position() &lt; count(tokenize($p5dg:filepath,'/'))]">
  26. <xsl:value-of select="."/><xsl:if test="not( position() = last())"><xsl:text>/</xsl:text></xsl:if>
  27. </xsl:for-each>
  28. </xsl:function>
  29. <xsl:function name="p5dg:filepath.dir">
  30. <xsl:param name="p5dg:filepath"/>
  31. <xsl:param name="p5dg.documentation.files.index.root_dir"/>
  32. <xsl:value-of select="$p5dg.documentation.files.index.root_dir"/><xsl:text>/</xsl:text>
  33. <xsl:for-each select="tokenize($p5dg:filepath,'/')[ position() &lt; count(tokenize($p5dg:filepath,'/'))]">
  34. <xsl:value-of select="."/><xsl:if test="not( position() = last())"><xsl:text>/</xsl:text></xsl:if>
  35. </xsl:for-each>
  36. </xsl:function>
  37. <xsl:function name="p5dg:filename">
  38. <xsl:param name="p5dg:filepath"/>
  39. <xsl:value-of select="tokenize($p5dg:filepath,'/')[ position() = count(tokenize($p5dg:filepath,'/'))]"/>
  40. </xsl:function>
  41. <!--<xsl:template match="p5dg:p5dg.documentation.files.index_analyzed.xml" mode="p5dg:p5ant.include.structure">
  42. <xsl:apply-templates mode="#current"/>
  43. </xsl:template>-->
  44. <xsl:template mode="p5dg:p5dg.documentation.files.index_fileset.xml" match="p5dg:p5dg.documentation.files.index.xml|object_merge_ant_object:object_merge_ant_object.from_remote_ant_object.files.index.xml" > <!-- xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd" -->
  45. <p5dg:p5dg.documentation.files.index_fileset.xml>
  46. <xsl:for-each select="tokenize(text(),';')">
  47. <p5dg:p5dg.file>
  48. <p5dg:filepath.dir><xsl:value-of select="p5dg:filepath.dir(.,$p5dg.documentation.files.index.root_dir)"/></p5dg:filepath.dir>
  49. <p5dg:filename><xsl:value-of select="p5dg:filename(.)"/></p5dg:filename>
  50. </p5dg:p5dg.file>
  51. </xsl:for-each>
  52. </p5dg:p5dg.documentation.files.index_fileset.xml>
  53. </xsl:template>
  54. <xsl:template mode="p5dg:p5dg.documentation.files.index_analyzed.xml" match="p5dg:p5dg.documentation.files.index_fileset.xml" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd">
  55. <p5dg:p5dg.documentation.files.index_analyzed.xml>
  56. <xsl:for-each-group select="p5dg:p5dg.file" group-by="p5dg:filepath.dir">
  57. <xsl:sort select="p5dg:filepath.dir"/>
  58. <xsl:choose>
  59. <xsl:when test=" matches(p5dg:filepath.dir,$p5dg.documentation.files.index.excludes.regex)">
  60. <xsl:comment>#62 excluded p5dg:filepath.dir=<xsl:value-of select="p5dg:filepath.dir"/> by $p5dg.documentation.files.index.excludes.regex: </xsl:comment>
  61. </xsl:when>
  62. <xsl:otherwise>
  63. <p5ant:filelist>
  64. <xsl:attribute name="dir" select="p5dg:filepath.dir"/>
  65. <xsl:variable name="dir.tokens" select="count(tokenize(p5dg:filepath.dir,'/'))"/>
  66. <xsl:choose>
  67. <xsl:when test="substring(p5dg:filepath.dir, string-length(p5dg:filepath.dir), 1) = '/'">
  68. <xsl:attribute name="dir.tokens" select="$dir.tokens - 1"/>
  69. </xsl:when>
  70. <xsl:otherwise>
  71. <xsl:attribute name="dir.tokens" select="$dir.tokens"/>
  72. </xsl:otherwise>
  73. </xsl:choose>
  74. <xsl:for-each select="current-group()">
  75. <xsl:sort select="p5dg:filename"/>
  76. <p5ant:file>
  77. <xsl:attribute name="name" select="p5dg:filename"/>
  78. </p5ant:file>
  79. </xsl:for-each>
  80. </p5ant:filelist>
  81. </xsl:otherwise>
  82. </xsl:choose>
  83. </xsl:for-each-group>
  84. <!-- <XSDComponent: Name:filelist Type:filelist Namespace:http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd
  85. Location:file:/Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/documentation_generator/repository/p5dg.documentation.files.antstructure-resp.xsd>
  86. </XSDComponent>-->
  87. <!--<SystemObjects__x3A__File:File>-->
  88. <!--<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
  89. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  90. xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  91. <soap:Body>
  92. <GetCitiesByCountryResponse xmlns="http://www.webserviceX.NET">
  93. <GetCitiesByCountryResult>&lt;NewDataSet&gt; &lt;Table&gt;
  94. &lt;Country&gt;Poland&lt;/Country&gt; &lt;City&gt;Gdansk-Rebiechowo&lt;/City&gt;
  95. &lt;/Table&gt; &lt;Table&gt; &lt;Country&gt;Poland&lt;/Country&gt;
  96. &lt;City&gt;Krakow&lt;/City&gt; &lt;/Table&gt; &lt;Table&gt;
  97. &lt;Country&gt;Poland&lt;/Country&gt; &lt;City&gt;Koszalin&lt;/City&gt;
  98. &lt;/Table&gt; &lt;Table&gt; &lt;Country&gt;Poland&lt;/Country&gt;
  99. &lt;City&gt;Katowice&lt;/City&gt; &lt;/Table&gt; &lt;Table&gt;
  100. &lt;Country&gt;Poland&lt;/Country&gt; &lt;City&gt;Poznan&lt;/City&gt; &lt;/Table&gt;
  101. &lt;Table&gt; &lt;Country&gt;Poland&lt;/Country&gt;
  102. &lt;City&gt;Rzeszow-Jasionka&lt;/City&gt; &lt;/Table&gt; &lt;Table&gt;
  103. &lt;Country&gt;Poland&lt;/Country&gt; &lt;City&gt;Szczecin&lt;/City&gt;
  104. &lt;/Table&gt; &lt;Table&gt; &lt;Country&gt;Poland&lt;/Country&gt;
  105. &lt;City&gt;Warszawa-Okecie&lt;/City&gt; &lt;/Table&gt; &lt;Table&gt;
  106. &lt;Country&gt;Poland&lt;/Country&gt; &lt;City&gt;Wroclaw Ii&lt;/City&gt;
  107. &lt;/Table&gt; &lt;Table&gt; &lt;Country&gt;Poland&lt;/Country&gt;
  108. &lt;City&gt;Zielona Gora&lt;/City&gt; &lt;/Table&gt;
  109. &lt;/NewDataSet&gt;</GetCitiesByCountryResult>
  110. </GetCitiesByCountryResponse>
  111. </soap:Body>
  112. </soap:Envelope>-->
  113. <!--</SystemObjects__x3A__File:File>-->
  114. </p5dg:p5dg.documentation.files.index_analyzed.xml>
  115. </xsl:template>
  116. <xsl:template mode="p5dg:p5dg.documentation.files.index_analyzed_structurized.xml" match="p5dg:p5dg.documentation.files.index_analyzed.xml" xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd">
  117. <p5dg:p5dg.documentation.files.index_analyzed_structurized.xml>
  118. <xsl:variable name="context.node" select="p5ant:filelist"/>
  119. <xsl:for-each-group select="p5ant:filelist[ position() = 1]" group-by="@dir.tokens">
  120. <xsl:sort select="number(@dir.tokens)"/>
  121. <xsl:apply-templates mode="#current" select="current-group()">
  122. <xsl:sort select="number(@dir.tokens)"/>
  123. <xsl:with-param name="context.node" select="$context.node"/>
  124. </xsl:apply-templates>
  125. </xsl:for-each-group>
  126. </p5dg:p5dg.documentation.files.index_analyzed_structurized.xml>
  127. </xsl:template>
  128. <xsl:template match="p5ant:filelist" mode="p5dg:p5dg.documentation.files.index_analyzed_structurized.xml">
  129. <xsl:param name="context.node" required="yes"/>
  130. <xsl:variable name="dir.tokens" select="@dir.tokens"/>
  131. <xsl:variable name="dir" select="@dir"/>
  132. <xsl:copy>
  133. <xsl:copy-of select="@*"/>
  134. <xsl:apply-templates mode="#current" select="$context.node[ contains(@dir,$dir) and number(@dir.tokens) = number($dir.tokens) + 1 ]">
  135. <xsl:sort select="number(@dir.tokens)"/>
  136. <xsl:with-param name="context.node" select="$context.node"/>
  137. </xsl:apply-templates>
  138. <xsl:choose>
  139. <xsl:when test="$context.node[ contains(@dir,$dir) and number(@dir.tokens) = number($dir.tokens) + 1 ]"/>
  140. <xsl:when test="$context.node[ contains(@dir,$dir) and number(@dir.tokens) &gt; number($dir.tokens) ]">
  141. <xsl:for-each-group select="$context.node/p5ant:filelist[ position() = 1 and contains(@dir,$dir) and number(@dir.tokens) &gt; number($dir.tokens) ]" group-by="@dir.tokens">
  142. <xsl:sort select="number(@dir.tokens)"/>
  143. <xsl:apply-templates mode="#current" select="current-group()">
  144. <xsl:sort select="number(@dir.tokens)"/>
  145. <xsl:with-param name="context.node" select="$context.node"/>
  146. </xsl:apply-templates>
  147. </xsl:for-each-group>
  148. </xsl:when>
  149. </xsl:choose>
  150. <xsl:apply-templates mode="p5dg:p5dg.documentation.files.index_analyzed_structurized.xml.file"/>
  151. </xsl:copy>
  152. </xsl:template>
  153. <xsl:template match="p5ant:file" mode="p5dg:p5dg.documentation.files.index_analyzed_structurized.xml.file">
  154. <xsl:copy-of select="."/>
  155. </xsl:template>
  156. <xsl:template match="*" mode="p5dg:p5dg.documentation.files.index_analyzed_structurized.xml.file"/>
  157. <!--<xsl:template match="*" mode="#all" >
  158. <xsl:message terminate="yes">#108 uncorrect input matched name()=<xsl:value-of select="name()"/> ;</xsl:message>
  159. </xsl:template>-->
  160. <xsl:template match="schema" mode="p5dg:documentation.files.antstructure-request.xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  161. <xsl:param name="p5dg:prefix" select="'p5ant-interface-request'"/>
  162. <schema xmlns="http://www.w3.org/2001/XMLSchema">
  163. <xsl:namespace name="{$p5dg:prefix}" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-request.xsd'"/>
  164. <!--<xsl:namespace name="p5ant-interface-resp" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd'"/>-->
  165. <xsl:copy-of select="@vc:minVersion"/>
  166. <xsl:attribute name="targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-request.xsd'"/>
  167. <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  168. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  169. </xsl:apply-templates>
  170. </schema>
  171. </xsl:template>
  172. <xsl:template match="schema" mode="p5dg:documentation.files.antstructure-resp.xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  173. <xsl:param name="p5dg:prefix" select="'p5ant-interface-resp'"/>
  174. <schema xmlns="http://www.w3.org/2001/XMLSchema">
  175. <!--<xsl:namespace name="p5ant-interface-request" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-request.xsd'"/>-->
  176. <xsl:namespace name="{$p5dg:prefix}" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd'"/>
  177. <xsl:copy-of select="@vc:minVersion"/>
  178. <xsl:attribute name="targetNamespace" select="'http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd'"/>
  179. <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  180. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  181. </xsl:apply-templates>
  182. </schema>
  183. </xsl:template>
  184. <xsl:template match="*" mode="p5dg:documentation.files.antstructure-request.xsd p5dg:documentation.files.antstructure-resp.xsd" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  185. <xsl:param name="p5dg:prefix" required="yes"/>
  186. <xsl:element name="{name()}" namespace="http://www.w3.org/2001/XMLSchema">
  187. <xsl:apply-templates mode="p5dg:documentation.files.antstructure-request.xsd.child" select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  188. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  189. </xsl:apply-templates>
  190. <xsl:choose>
  191. <xsl:when test="attribute" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  192. <xsl:variable name="sequence" select="*[local-name()='sequence' or local-name()='choice' or local-name()='all' ]/name()" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  193. <xsl:choose>
  194. <xsl:when test=" string-length($sequence)&gt;0">
  195. <xsl:element name="sequence" namespace="http://www.w3.org/2001/XMLSchema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  196. <xsl:apply-templates mode="p5dg:documentation.files.antstructure-request.xsd.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  197. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  198. </xsl:apply-templates>
  199. </xsl:element>
  200. </xsl:when>
  201. <xsl:otherwise>
  202. <xsl:element name="sequence" namespace="http://www.w3.org/2001/XMLSchema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  203. <xsl:apply-templates mode="p5dg:documentation.files.antstructure-request.xsd.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  204. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  205. </xsl:apply-templates>
  206. </xsl:element>
  207. </xsl:otherwise>
  208. </xsl:choose>
  209. </xsl:when>
  210. <xsl:otherwise>
  211. <xsl:apply-templates mode="p5dg:documentation.files.antstructure-request.xsd.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  212. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  213. </xsl:apply-templates>
  214. </xsl:otherwise>
  215. </xsl:choose>
  216. <xsl:comment>#70 here</xsl:comment>
  217. </xsl:element>
  218. </xsl:template>
  219. <xsl:template match="@use|@minOccurs|@maxOccurs" mode="p5dg:documentation.files.antstructure-request.xsd.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema"/>
  220. <xsl:template match="@*" mode="p5dg:documentation.files.antstructure-request.xsd.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  221. <xsl:param name="p5dg:prefix" required="yes"/>
  222. <xsl:choose>
  223. <xsl:when test="substring-before(.,':')='p5ant'">
  224. <xsl:attribute name="{name()}" select="concat($p5dg:prefix,':', substring-after(.,':'))" />
  225. </xsl:when>
  226. <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
  227. </xsl:choose>
  228. </xsl:template>
  229. <xsl:template match="*" mode="p5dg:documentation.files.antstructure-request.xsd.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  230. <xsl:param name="p5dg:prefix" required="yes"/>
  231. <xsl:element name="{name()}" namespace="http://www.w3.org/2001/XMLSchema">
  232. <!--<xsl:attribute name="p5dg:forced.86">tak</xsl:attribute>-->
  233. <xsl:apply-templates mode="#current" select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  234. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  235. </xsl:apply-templates>
  236. <xsl:apply-templates mode="#current" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  237. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  238. </xsl:apply-templates>
  239. </xsl:element>
  240. </xsl:template>
  241. <!--<xsl:template match="*" mode="p5dg:documentation.files.antstructure-request.xsd.child" >
  242. <xsl:param name="p5dg:prefix" required="yes"/>
  243. <xsl:element name="{name()}" namespace="http://www.w3.org/2001/XMLSchema">
  244. <xsl:attribute name="p5dg:forced.109">tak</xsl:attribute>
  245. <xsl:apply-templates mode="#current" select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  246. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  247. </xsl:apply-templates>
  248. </xsl:element>
  249. </xsl:template>-->
  250. <xsl:template match="attribute" mode="p5dg:documentation.files.antstructure-request.xsd.child" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  251. <xsl:param name="p5dg:prefix" required="yes"/>
  252. <xsl:element name="element" namespace="http://www.w3.org/2001/XMLSchema">
  253. <!--<xsl:attribute name="p5dg:forced.86">tak</xsl:attribute>-->
  254. <xsl:apply-templates mode="#current" select="@*" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  255. <xsl:with-param name="p5dg:prefix" select="$p5dg:prefix"/>
  256. </xsl:apply-templates>
  257. </xsl:element>
  258. </xsl:template>
  259. <xsl:template match="schema" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  260. <schema vc:minVersion="1.1" xmlns="http://www.w3.org/2001/XMLSchema">
  261. <xsl:namespace name="p5ant" select="'http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/ant/ant.xsd'"/>
  262. <!--<xsl:namespace name="xs" select="'http://www.w3.org/2001/XMLSchema'"/>-->
  263. <xsl:copy-of select="@*"/>
  264. <xsl:comment>#179 making public simpleTypes to controll deriviation</xsl:comment>
  265. <xsl:for-each-group select="*//attribute" group-by="concat(@name,'-',@type)" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  266. <xsl:element name="simpleType" namespace="http://www.w3.org/2001/XMLSchema" inherit-namespaces="yes">
  267. <!-- jest p5ant:string_simpleTypedescription na simpleType name="description_simpleTypestring" było concat(@name,'_simpleType',@type)
  268. <attribute name="name"
  269. type="p5ant:string_simpleTypename"
  270. fixme_todo="p5ant:name_simpleTypestring"
  271. use="optional"/>
  272. -->
  273. <xsl:attribute name="name" select="concat(@name,'_simpleType',@type)"/>
  274. <xsl:comment> pptional : <xsl:value-of select="concat(@type,'_simpleType',@name)"/></xsl:comment>
  275. <xsl:choose>
  276. <xsl:when test="@type">
  277. <restriction base="{@type}" />
  278. </xsl:when>
  279. <xsl:otherwise>
  280. <restriction base="string" />
  281. </xsl:otherwise>
  282. </xsl:choose>
  283. <!--<xsl:if test="@type"><restriction base="{@type}" /></xsl:if>--> <!-- namespace="http://www.w3.org/2001/XMLSchema" -->
  284. </xsl:element>
  285. </xsl:for-each-group>
  286. <!--<debug_attrs>
  287. <xsl:copy-of select="*//attribute"/>
  288. </debug_attrs>-->
  289. <xsl:for-each-group select="*" group-by="concat(@name,local-name())" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  290. <xsl:apply-templates mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.rootElements" select="." xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema"/>
  291. <xsl:apply-templates mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.rootComplexTypes" select="." xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema"/>
  292. </xsl:for-each-group>
  293. </schema>
  294. </xsl:template>
  295. <xsl:template match="*" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.rootElements p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.rootComplexTypes">
  296. <missed.45>
  297. <xsl:copy-of select="."/>
  298. <xsl:message terminate="yes">#198 shouldnt be terminated!</xsl:message>
  299. </missed.45>
  300. </xsl:template>
  301. <xsl:template match="element[complexType]" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.rootComplexTypes" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  302. <xsl:element name="element" namespace="http://www.w3.org/2001/XMLSchema">
  303. <xsl:attribute name="type" select="concat('p5ant:',@name)"/>
  304. <xsl:attribute name="name" select="@name"/>
  305. </xsl:element>
  306. </xsl:template>
  307. <xsl:template match="element[complexType]" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.rootElements" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  308. <xsl:element name="complexType" namespace="http://www.w3.org/2001/XMLSchema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  309. <xsl:copy-of select="@*"/>
  310. <xsl:apply-templates mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd" select="complexType/*" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema"/>
  311. </xsl:element>
  312. </xsl:template>
  313. <xsl:template match="@*" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.simpleType p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.simpleType.attribute" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  314. <xsl:copy-of select="."/>
  315. </xsl:template>
  316. <xsl:template match="@type" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.simpleType.attribute" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  317. <xsl:attribute name="{name()}" select="concat('p5ant:',../@name,'_simpleType',current())"/>
  318. <!--<xsl:attribute name="fixme_todo" select=""/>-->
  319. </xsl:template>
  320. <xsl:template match="@type" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.simpleType" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  321. <xsl:attribute name="{name()}" select="concat('p5ant:',current(),'_simpleType',../@name)"/>
  322. <xsl:attribute name="fixme_todo" select="concat('p5ant:',../@name,'_simpleType',current())"/>
  323. </xsl:template>
  324. <xsl:template match="attribute" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd" xpath-default-namespace="http://www.w3.org/2000/10/XMLSchema">
  325. <xsl:element name="{local-name()}" namespace="http://www.w3.org/2001/XMLSchema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  326. <!--<xsl:copy-of select="@*"/>-->
  327. <xsl:apply-templates select="@*" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd.simpleType.attribute"/>
  328. <xsl:apply-templates mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd" />
  329. </xsl:element>
  330. </xsl:template>
  331. <xsl:template match="*" mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd">
  332. <xsl:element name="{local-name()}" namespace="http://www.w3.org/2001/XMLSchema" xpath-default-namespace="http://www.w3.org/2001/XMLSchema">
  333. <xsl:copy-of select="@*"/>
  334. <xsl:apply-templates mode="p5dg:documentation.ant.dtd2xsd.pl.fix.xsd" />
  335. </xsl:element>
  336. </xsl:template>
  337. <xsl:template match="SystemObjects__x3A__File:func" mode="SystemObjects__x3A__File:name">
  338. </xsl:template>
  339. </xsl:stylesheet>