I am completely new to using XSLT, but in my job they're asking me to do a little XSL Transformation. Please forgive me if my question is too basic.
I work with handwritten poetry and I'd like to see every verse (l element, inside lg) as a line. Verses could include several elements, such as abbreviations (abbr), deletions (del), additions (add) and other elements. I need these elements to be shown in different colors inside each verse.
This is part of the code I've been able to write so far.
<xsl:template match = "TEI/text/body/lg">
<p><xsl:apply-templates select = "l" /></p>
</xsl:template>
<xsl:template match="l" priority="0">
<span style="color:black;">
<xsl:value-of select="." />
</span><br/>
</xsl:template>
Hope you can help.
Please try the following solution:
Given this input, which appears to be encoded in the TEI (Text Encoding Initiative) format:
the following stylesheet:
will output this HTML:
It will work with any of the follwing XSLT processors: