Print

Print


I do the same sort of thing. I've actually come to wonder what <p> 
really means, both in XHTML and TEI; I think it's quite hard to define 
what a paragraph is, especially when it does contain other block 
elements such as lists. XHTML seems to insist that it's the lowest level 
of block element, so it can't contain any others, but that doesn't match 
with real-world typographical paragraphs at all.

Cheers,
Martin

John A. Walsh wrote:
> 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
> -- 
> | 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
>>  <list>
>>    <item>green food</item>
>>    <item>healthy food</item>
>>  </list>
>> as evinced by this exchange:
>> <quote>
>>  Mr Magoo: I hate cabbages
>> </quote>
>> (which is usually marked up as
>>  <eg><!CDATA[<sp>I hate cabbages</sp>]]></eg>
>>  if you use TEI).
>> There, happy now?
>> </p>
>>
>> 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
>> http://www.oss-watch.ac.uk