recurse_ant_to_html.xsl 773 B

1234567891011121314151617181920212223242526
  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. exclude-result-prefixes="xs"
  5. version="2.0">
  6. <xsl:output indent="yes"/>
  7. <xsl:strip-space elements="*"/>
  8. <xsl:template match="*">
  9. <html>
  10. <body>
  11. <xsl:apply-templates mode="child"/>
  12. </body>
  13. </html>
  14. </xsl:template>
  15. <xsl:template mode="child" match="*">
  16. <table>
  17. <tr><td><xsl:value-of select="name()"/></td></tr>
  18. <tr><td><xsl:value-of select="text()"/></td></tr>
  19. <tr><td><xsl:apply-templates mode="child"></xsl:apply-templates></td></tr>
  20. </table>
  21. </xsl:template>
  22. </xsl:stylesheet>