parent
3d45451fef
commit
2c245f9506
|
@ -20,10 +20,18 @@
|
|||
list-style-type: none;
|
||||
}
|
||||
|
||||
.element {
|
||||
.tag {
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
.attr {
|
||||
color: darksalmon;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: lightgrey;
|
||||
}
|
||||
|
@ -55,15 +63,27 @@
|
|||
<xsl:template match="*">
|
||||
<li>
|
||||
<span class="element">
|
||||
<xsl:value-of select="concat('<', name(), '>')"/>
|
||||
<
|
||||
<span class="tag"><xsl:value-of select="name()"/></span>
|
||||
|
||||
<xsl:for-each select="@*">
|
||||
<span class="attr"> <xsl:value-of select="name()"/></span>
|
||||
=
|
||||
"<span class="value"><xsl:value-of select="."/></span>"
|
||||
</xsl:for-each>
|
||||
>
|
||||
</span>
|
||||
|
||||
<xsl:if test="node()">
|
||||
<ul>
|
||||
<xsl:apply-templates/>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
|
||||
<span class="element">
|
||||
<xsl:value-of select="concat('</', name(), '>')"/>
|
||||
</
|
||||
<span class="tag"><xsl:value-of select="name()"/></span>
|
||||
>
|
||||
</span>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
|
Loading…
Reference in New Issue