Making Page Breaks Visible

One of the surprising challenges of transforming Digital Day Thoughts into a web version was making page breaks in the source material readily visible. Part of the fun (or frustration, depending on mood) of working with text in XML and XSL is figuring out the logic of hierarchy. I determined that a simple horizontal line would be the simplest means of distinguishing pages, but I couldn’t figure how to create one within the template match for the page break itself—I would have to insert the graphic lines through a template match for the poetry lines, and this proved thorny. For those who are undertaking similar “small” challenges in XSLT, I am going to include an annotated description of my XSL code here.

First, the code:

<xsl:template match="tei:l">
        <xsl:variable name="PageChecker" select="name(preceding-sibling::*[1])"></xsl:variable>
        <xsl:variable name="PageAssigner" select="preceding-sibling::*[1]/@edRef"></xsl:variable>
        <!--To check whether there are page breaks