I've shared my little cheat with Sebastian before, but I handle the
inflexibility of XHTML's <p> by discarding it all together. I output
the TEI <p> as an XHTML <div class="p">. Since an XHTML <div> can
contain lists (<ul>, <ol>, etc.), <blockquote>, and the other
problematic content, this technique solves the validation problem.
Then I simply style the XHTML <div> to behave as I want a paragraph
to behave. I admit this is a bit of a hack, but I think it's fair
enough. A paragraph, after all, is a division of text, and both <p>
and <div> are block elements. If the more specific XHTML <p> did not
exist, then the solution would be thoroughly legitimate. And the
hack does not result in the same kind of semantic abuse as using a
<table> for layout of non-tabular data.
| John A. Walsh
| Associate Director for Projects and Services, Digital Library Program
| Associate Librarian, University Libraries
| Adjunct Associate Professor, Department of English
| Indiana University, 1320 East Tenth Street, Bloomington, IN 47405
| Voice:812-855-8758 Fax:812-856-2062 <mailto:[log in to unmask]>
On May 8, 2006, at 5:48 AM, Sebastian Rahtz wrote:
> Nice try, George, but does your code do right thing with this?
> <p><name>Mr Magoo</name> didn't like eating <emph>cabbages</emph>
> or <foreign>chou croute</foreign>. Indeed, his pet hates were
> <item>green food</item>
> <item>healthy food</item>
> as evinced by this exchange:
> Mr Magoo: I hate cabbages
> (which is usually marked up as
> <eg><!CDATA[<sp>I hate cabbages</sp>]]></eg>
> if you use TEI).
> There, happy now?
> I contend that making valid XHTML from the above is non-trivial.
> Sebastian Rahtz
> Information Manager, Oxford University Computing Services
> 13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
> OSS Watch: JISC Open Source Advisory Service