-<xsl:stylesheet version="1.0">
<xsl:preserve-space elements="*"/>
<xsl:output indent="no"/>
-<xsl:template match="item">
-<div>
-<xsl:attribute name="class">
-<xsl:choose>
<xsl:when test="@num mod 2 = 0">even</xsl:when>
<xsl:otherwise>uneven</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
-<div class="pos">
<xsl:value-of select="@num"/>
</div>
-<div class="item">
<xsl:apply-templates/>
</div>
</div>
</xsl:template>
-<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
-<xsl:template match="processing-instruction()">
-<dd>
-<font color="darkred">
<?
<xsl:value-of select="."/>
?>
</font>
</dd>
</xsl:template>
-<xsl:template match="comment()">
-<div class="xml-comment">
<--
<xsl:value-of select="."/>
-->
</div>
</xsl:template>
-<xsl:template match="@*">
-<span class="xml-attr-name" xml:space="preserve">
<xsl:text> </xsl:text>
<xsl:value-of select="name(.)"/>
</span>
<xsl:text>="</xsl:text>
-<span class="xml-attr-value">
<xsl:value-of select="."/>
</span>
<xsl:text>"</xsl:text>
</xsl:template>
-<xsl:template match="text()">
-<span class="xml-text">
<xsl:value-of select="."/>
</span>
</xsl:template>
-<xsl:template match="exist:match">
-<span class="xml-match">
<xsl:value-of select="."/>
</span>
</xsl:template>
-<xsl:template match="*">
-<div class="xml-element">
-<span class="xml-element-tag">
<xsl:text><</xsl:text>
</span>
-<span class="xml-element-name">
<xsl:value-of select="name()"/>
</span>
<xsl:apply-templates select="@*"/>
-<xsl:choose>
-<xsl:when test="count(node()) > 0">
<span class="xml-element-tag">></span>
<xsl:apply-templates select="node()|comment()"/>
<span class="xml-element-tag"></</span>
-<span class="xml-element-name">
<xsl:value-of select="name()"/>
</span>
<span class="xml-element-tag">></span>
</xsl:when>
-<xsl:otherwise>
<span class="xml-element-tag">/></span>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
</xsl:stylesheet>