XSLT 2.0, stylesheet and data at https://xsltfiddle.liberty-development.net/bFDb2D3/4
I am transforming medieval documents encoded in tei-xml into webpages where the user can toggle between two different views of the documents, as well as see the translation and various footnotes (eg). This requires multiple layers of processing to output:
- Two latin versions ('inter' and 'diplo') between which the user can toggle (derived from the same tei markup)
- Translated version with almost no transformations (just paragraph formatting and italics)
- Critical apparatus using footnoting # a, b, c, etc.
- Historical footnotes using footnoting # 1, 2, 3, etc.
I am using modes
in order to handle the levels of processing, and each mode on its own works fine, but together they are missing outputs.
What should output:
<div class="inter"><p>
with all transformations modeinter
+fn-add-marker
[this should contain<a href>
, superscript letters and numbers in text]<div class="diplo"><p>
with all transformations modediplo
+fn-add-marker
[this should contain [text] , line numbers, superscript letters and numbers in text]<div><p>
with translations<div>
with critical apparatus<div>
with footnotes
The XSLTfiddle output is:
- URL and superscript letters ok! missing superscript numbers (mode
fn-add-marker
) - Superscript letters ok! Line # and [text] ok except where inside
<persName>
or<placeName>
(ie.<xsl:template match="tei:lb">
<xsl:template match="tei:supplied">
) and missing superscript numbers (modefn-add-marker
) - ok!
- ok!
- ok!
With respect to #2, the missing line # and [text] appear to be a result of the templates that treat <persName>
and <placeName>
not handing off to other templates? (templates at lines 173-218)
All templates concerning mode fn-add-marker
are at lines 41-77.
Many thanks in advance.