So the title of this post may be a little misleading, but it's the best I can come up with. I'm working on a project that uses TEI for encoding texts. One of the requirements of my current work is to write XSL transformations to render the XML-encoded texts as HTML. For the most part, no problem. I'm kind of stuck on this issue, though:
<l>There is <delSpan spanTo="A1"/>deleted text spanning</l>
<l>multiple lines here.<anchor xml:id="A1"/> More text...</l>
Or, in other instances:
<delSpan spanTo="A2"/>
<l>Several deleted lines -- the delspan marker can appear </l>
<l>outside of an l element.... </l>
<anchor xml:id="A2"/>
(In case you're not familiar with TEI: l = a line of text; delSpan = span of deleted text that includes more than 1 line, page, or smaller unit.)
The goal is to display the text between the delSpan (A1) and its corresponding anchor (A1) -- "deleted text spanning / multiple lines here" -- with some formatting that indicates the deletion (e.g., text-decoration="line-through"). Right now, there's a template for "l" elements that handles most text formatting--or at least calls other templates to do it.
But these singleton tags are an anomaly; all other formatting/markup is accomplished with tags that actually contain the text they're meant to format. Am I right in assuming that I need to process the delSpan and anchor elements in the "l" template? What's the most elegant way to approach this problem and handle the pseudo-overlapping elements?
Sorry if this is a noob question or if I haven't given enough information. I'm primarily a C/C++ programmer with little XSLT experience, so I appreciate any suggestions.