documentation_generator.xsl 24 KB

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