> I'd be interested to hear how you do this without using
> disable-output-escaping or using XSLT 2.0
I did use XSLT 2.0 for this stylesheet, but I believe the fragment
that does the work is in fact valid XSLT 1.0.
> yes please.
Stylesheet fragment attached below. Note that it is currently written
to handle only <eg> and <list>, but you can see how to extend it by
changing the match= of the <xsl:for-each>, and the definitions of the
variables 'before-me' and 'content'.
Sample output fragment (which, I believe you will find, is valid
XHTML if plopped into a proper document with a root element, a
<head>, and a <body> and all that):
And again, I am pretty sure that there are better ways to do this
(although they might require XSLT 2.0, which some of us have some
moral qualms against using). Furthermore, I'm not claiming at all
that my XSLT code is the best way to implement this algorithm. All I
am claiming is that it works for me.
Lastly, although this was a significant effort on my part to get
working properly (took hours), as the comment says, Jenni Tennison
gets the credit for the really hard part, which I don't even
BTW, this stylesheet fragment is part of yet another presentation
system: it reads in a TEI document (of a particular P5 customized
flavor) and writes out slides and potentially handout notes and
lecture notes, all in valid XHTML. So far this system has only been
seen or used by myself, Julia Flanders, and Christian Wittern (and
our students :-). I am expecting to make it publicly available,
probably on the TEI wiki, sometime soon (measured in weeks). The
entire system should be available under some free license or other.
Note that the fragment of code above should be considered copyleft
2005 by Syd Bauman. Feel free to use, copy, modify, etc. under GPL