I'd like to run a problem by everyone to see if anyone else has faced
it, and if so, how they handled it.
TEI <list>/<item> are typically XSL-transformed into XHTML <ul>/<li> or
<ol>/<li>, but such transformations are problematic, because while TEI
<list> allows lots of different kinds of elements inside it, XHTML <ul>
and <ol> are much more restrictive.
I'm facing a situation where I have this (much simplified):
<fw type="sig">õ 2</fw>
<fw type="head">BLAH BLAH</fw>
In other words, <fw> and <pb> elements interrupt the list. This is (as
far as I can see) perfectly good TEI, but it translates into lousy XHTML
because the <div>s, <span>s or whatever I'm using for <fw> and <pb> are
not allowed inside <ul>.
I can see a number of potential solutions, none of which looks ideal to me:
1. Refactor the XML markup to break the list into two, with some kind of
connecting mechanism to handle numbering correctly in the case of an
ordered list. I don't like this because I don't like markup to be driven
by output constraints.
2. Catch this situation in the XSLT and refactor the XHTML output into
two or more separate lists, again with appropriate number-handling. This
is possible but fiddly.
3. Include the output for the <fw>, <pb> etc. in the <li> for the item
which precedes them. This is probably going to look wrong, even if it
results in valid XHTML, because margins, padding etc. for the item are
going to be inherited by the <fw> and <pb>. Overriding that is likely to
be painful from a CSS point of view.
I tested Sebastian's P5 stylesheets on one of my problem documents, and
it appears that they simply ignore <fw> and <pb> inside <list>; there's
no output from them at all. I can't go with that option, unfortunately.
Anyone with experience of this or suggestions?
University of Victoria Humanities Computing and Media Centre
([log in to unmask])