| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- exclude-result-prefixes="xs"
- version="2.0">
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:template match="*">
- <html>
- <body>
- <xsl:apply-templates mode="child"/>
- </body>
- </html>
- </xsl:template>
- <xsl:template mode="child" match="*">
- <xsl:choose>
- <xsl:when test="./*">
- <table border="1">
- <tr><td>
- <table border="1">
- <tr>
- <xsl:for-each select="*[ not( child::node()/*) and string-length(text()) >0]">
- <td><xsl:value-of select="name()"/></td>
- </xsl:for-each>
- </tr>
- <tr>
- <xsl:for-each select="*[ not( child::node()/*) and string-length(text()) >0]">
- <td><xsl:value-of select="."/></td>
- </xsl:for-each>
- </tr>
- </table>
- </td></tr>
-
- <tr><td><xsl:apply-templates mode="child"/></td></tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <!--<table>
- <tr><td>
- <table>
- <tr>
- <xsl:for-each select=".[ not( child::node()/*)]">
- <td><xsl:value-of select="name()"/></td>
- </xsl:for-each>
- </tr>
- <tr>
- <xsl:for-each select=".[ not( child::node()/*)]">
- <td><xsl:value-of select="."/></td>
- </xsl:for-each>
- </tr>
- </table>
- </td></tr>
-
- </table>-->
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- </xsl:stylesheet>
|