1 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 2 <xsl:output 3 method="html" version="4" 4 indent="yes" 5 encoding="iso-8859-15" 6 /> 7 8 <xsl:template match="rows"> 9 <html> 10 <head> 11 <style> 12 @import "/home/domenico/my/docs/style.css"; 13 </style> 14 <title> 15 Data Viewer - Table <xsl:value-of select="@table"/> 16 </title> 17 </head> 18 <body> 19 <h1>Data Viewer - Table <xsl:value-of select="@table"/></h1> 20 <table> 21 <tr> 22 <xsl:for-each select="row[1]/*"> 23 <th><xsl:value-of select="name()" /></th> 24 </xsl:for-each> 25 </tr> 26 <xsl:for-each select="row"> 27 <xsl:if test="(position() mod 2)=0"> 28 <tr class="r_even"> 29 <xsl:apply-templates/> 30 </tr> 31 </xsl:if> 32 <xsl:if test="(position() mod 2)!=0"> 33 <tr class="r_odd"> 34 <xsl:apply-templates/> 35 </tr> 36 </xsl:if> 37 </xsl:for-each> 38 </table> 39 </body> 40 </html> 41 </xsl:template> 42 43 <xsl:template match="row/*"> 44 <td><xsl:value-of select="."/></td> 45 </xsl:template> 46 47 <xsl:template match="columns"> 48 <html> 49 <head> 50 <style> 51 @import "/home/domenico/my/docs/style.css"; 52 </style> 53 <title> 54 Type Viewer - table <xsl:value-of select="@table"/> 55 </title> 56 </head> 57 <body> 58 <h1>Type Viewer - table <xsl:value-of select="@table"/></h1> 59 <table> 60 <tr> 61 <th>N.</th> 62 <th>Sql Type</th> 63 <th>PK</th> 64 <th>name</th> 65 </tr> 66 <xsl:apply-templates/> 67 </table> 68 </body> 69 </html> 70 </xsl:template> 71 72 <xsl:template match="column"> 73 <tr><td>#<xsl:number /></td> 74 <td><xsl:value-of select="@sqlType"/></td> 75 <td><xsl:value-of select="@primaryKey"/></td> 76 <xsl:apply-templates/> 77 </tr> 78 </xsl:template> 79 80 <xsl:template match="column/*"> 81 <td><xsl:value-of select="."/></td> 82 </xsl:template> 83 84 </xsl:stylesheet>