[1402] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
| 3 | <xsl:output method="html"/> |
---|
| 4 | <xsl:template match="/"> |
---|
| 5 | <html> |
---|
| 6 | <body> |
---|
[1403] | 7 | <head> |
---|
| 8 | <title> |
---|
| 9 | <xsl:value-of select="object/name"/> |
---|
| 10 | </title> |
---|
| 11 | <link rel="stylesheet" type="text/css" media="all" |
---|
| 12 | href="xsl.css" /> |
---|
| 13 | </head> |
---|
[1402] | 14 | <xsl:for-each select="object"> |
---|
| 15 | <h2> |
---|
| 16 | <xsl:value-of select="@name"/> |
---|
| 17 | Metatype: <xsl:value-of select="@meta_type"/> |
---|
| 18 | </h2> |
---|
| 19 | </xsl:for-each> |
---|
| 20 | <h1>Columns</h1> |
---|
| 21 | <table> |
---|
| 22 | <xsl:for-each select="object/column"> |
---|
| 23 | <xsl:sort select="@value" |
---|
| 24 | order="ascending" /> |
---|
[1410] | 25 | <xsl:variable name="color"> |
---|
| 26 | <xsl:choose> |
---|
| 27 | <xsl:when test="position() mod 2 = 0"> |
---|
| 28 | <xsl:text>#ffffff</xsl:text> |
---|
| 29 | </xsl:when> |
---|
| 30 | <xsl:otherwise> |
---|
| 31 | <xsl:text>#eeeeee</xsl:text> |
---|
| 32 | </xsl:otherwise> |
---|
| 33 | </xsl:choose> |
---|
| 34 | </xsl:variable> |
---|
| 35 | <tr style="background-color:{$color}"> |
---|
[1402] | 36 | <td colspan=""> |
---|
| 37 | <xsl:value-of select="@value"/> |
---|
| 38 | </td> |
---|
| 39 | </tr> |
---|
| 40 | </xsl:for-each> |
---|
| 41 | </table> |
---|
| 42 | <h1>Indexes</h1> |
---|
| 43 | <table> |
---|
| 44 | <tr> |
---|
| 45 | <th>Name</th> |
---|
| 46 | <th>Meta-Type</th> |
---|
| 47 | <th>Indexed Attribute</th> |
---|
| 48 | </tr> |
---|
| 49 | <xsl:for-each select="object/index"> |
---|
| 50 | <xsl:sort select="@name" |
---|
| 51 | order="ascending" /> |
---|
[1410] | 52 | <xsl:variable name="color"> |
---|
| 53 | <xsl:choose> |
---|
| 54 | <xsl:when test="position() mod 2 = 0"> |
---|
| 55 | <xsl:text>#ffffff</xsl:text> |
---|
| 56 | </xsl:when> |
---|
| 57 | <xsl:otherwise> |
---|
| 58 | <xsl:text>#eeeeee</xsl:text> |
---|
| 59 | </xsl:otherwise> |
---|
| 60 | </xsl:choose> |
---|
| 61 | </xsl:variable> |
---|
| 62 | <tr style="background-color:{$color}"> |
---|
[1402] | 63 | <td colspan=""> |
---|
| 64 | <xsl:value-of select="@name"/> |
---|
| 65 | </td> |
---|
| 66 | <td colspan=""> |
---|
| 67 | <xsl:value-of select="@meta_type"/> |
---|
| 68 | </td> |
---|
| 69 | <xsl:for-each select="indexed_attr"> |
---|
| 70 | <td> |
---|
| 71 | <xsl:value-of select="@value"/> |
---|
| 72 | </td> |
---|
| 73 | </xsl:for-each> |
---|
| 74 | </tr> |
---|
| 75 | </xsl:for-each> |
---|
| 76 | </table> |
---|
| 77 | </body> |
---|
| 78 | </html> |
---|
| 79 | </xsl:template> |
---|
| 80 | </xsl:stylesheet> |
---|