LineNumber.xsl

Summary
This is a XSLT script for adding a line number to each fifth line of poetry. Such numbering is standard in scholarly editions.

This is also one of my first exercises in writing XSL; it would be interesting to see how it could be improved.

Add any comments to the 'discussion' tab.

Required Input
Any TEI XML file, preferably with "l" elements in it.

Expected Output
Text only, but with line counts added in every fifth verse, enclosed in square brackets. All lines are indented by one tab.

Known Restrictions or Problems
Text only. Numbers lines consecutively, therefore it is not appropriate for collections of poems, or for poems with several cantos etc.

Stylesheet


>!-- Neven Jovanović, 2008 -->  

     [  ]&#9;                &#9;</xsl:text> <xsl:value-of select = "." />           </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:template> </xsl:stylesheet>