xsd-to-dita_config.xsl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  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:xsd-to-dita="xsd-to-dita.xsd"
  5. exclude-result-prefixes="xs xsd-to-dita"
  6. version="2.0">
  7. <xsl:variable name="xsd-to-dita:master.xsd" select="'xsd-to-dita_master.xsd'"/>
  8. <xsl:variable name="xsd-to-dita:out__dir" select="'xsd-to-dita'"/>
  9. <xsl:template mode="xsd-to-dita:master.xsd" match="xs:schema">
  10. <map>
  11. <!--<xsl:copy-of select="descendant-or-self::*/namespace::node()"></xsl:copy-of>-->
  12. <xsl:apply-templates mode="#current"/>
  13. <xsl:apply-templates mode="xsd-to-dita:master.xsd__import"/>
  14. </map>
  15. </xsl:template>
  16. <xsl:template mode="xsd-to-dita:master.xsd" match="xs:annotation[xs:documentation]">
  17. <title>#23
  18. <xsl:copy-of select="xs:documentation/text()"/>
  19. </title>
  20. </xsl:template>
  21. <xsl:function name="xsd-to-dita:dita_id">
  22. <xsl:param name="xsd-to-dita:href"/>
  23. <xsl:value-of select="tokenize($xsd-to-dita:href,'/')[last()]"/>
  24. </xsl:function>
  25. <xsl:variable name="xsd-to-dita:master.xsd__import__schemaLocation"/>
  26. </xsl:stylesheet>