documentation_generator.xsl 25 KB

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