
Marcello wrote:
Andrew Sly wrote:
Has anyone here had experience in marking up a passage which contains a couple of quoted lines of verse that clearly occur within a paragraph?
TEI has not the petty limitations of HTML. A TEI p can contain q, list, table, figure, text. (This is also the reason why XSL transformation from TEI to HTML is hard. An HTML p may not contain blockquote, ul, ol, dl, table.)
Mark it up straight like this:
------------------- <p>The cows swung placidly down the lane, and Anne followed them dreamily, repeating aloud the battle canto from <title>Marmion</title>—which had also been part of their English course the preceding winter and which Miss Stacy had made them learn off by heart—and exulting in its rushing lines and the clash of spears in its imagery. When she came to the lines
<quote rend="display"> <lg> <l>The stubborn spearsmen still made good</l> <l>Their dark impenetrable wood,</l> </lg> </quote>
she stopped in ecstasy to shut her eyes that she might the better fancy herself one of that heroic ring. When she opened them again it was to behold Diana coming through the gate that led into the Barry field and looking so important that Anne instantly divined there was news to be told. But betray too eager curiosity she would not.</p> ----------------------
You may also use <q> instead of <quote>. But <quote> is more correct if it references a published work.
My first thought, as what I always do when encountering text to markup, is to understand the presentation-agnostic *structure* and/or *semantics* of what I'm seeing in the typography. The two lines in the example forms a structural block of a certain kind. The question now is *what* does this block represent. Well, for starters, it is a snippet of verse that appears within a paragraph but obviously is intended to be autonomous to the paragraph (rather than just being quoted inline as is often done.) But what kind of verse, or where does it come from? Marcello identifies (and it appears correct to me) as a <quote>, so that works for me (need to study up more on the TEI <quote> tag.) A <lg> just doesn't have enough semantic meaning (without adding an attribute) to let it be a child of the <p> tag. The TEI authors apparently recognize this and allow only certain "block-level" tags within <p>, so the markup wonk has to somehow fit the "in paragraph" block they encounter into one of those allowed in TEI. (Another area to study -- the elements allowed as children of the TEI <p> tag -- looking at the full flattened DTD now, which I'll append at the end.) ***** Regarding the limitation of HTML <p>, yes that is frustrating. There are block-level tags (actually tags that can be either block or inline, among them <del>, <ins>, <script>, and <noscript>) that can be placed within <p>, but none of them are *meant* to be used for what we'd like and should not be used that way. One could take advantage of the flexible <div> tag (such as <div class="paragraph">) to contain both inline and block-level stuff and use that instead of <p> in this case. But this is also a kludge which, without a CSS stylesheet, does not lead to proper rendering of the paragraph PCDATA portion -- but if one doesn't care about non-CSS rendering for a particular document, then it would be what I'd do, and state in a comment within the document that <div class="paragraph"> is intended to be identical to <p>. (Note: HTML was never designed to represent the more complex structures we find in books.) XHTML 2.0 is planning to remove the limitation of <p> and allow it to contain some block-level stuff in mixed fashion with PCDATA (it will allow lists, blockquote and the new blockcode, tables and <pre>.) On a related matter, XHTML is even planning to chuck the <br /> tag (which is problematic -- which to me is almost always a lazy-person's tag so they don't have to markup the full structure) and replace it with the inline <l> tag, which means a line, so one may have in XHTML 2.0: <!-- XHTML 2.0 example --> <p>Some text. <l>A line.</l> <l>A second line.</l> Some more text.</p> (Refer to http://www.w3.org/TR/xhtml2/mod-text.html#s_textmodule for what the XHTML people have in mind for the <l> tag for XHTML 2.0.) The XHTML 2.0 folk are aware of the limitations of HTML (up to XHTML 1.1) with respect to document structure and are improving it. XHTML 2.0 is not intended to "compete" with TEI, but certainly will make it possible for XHTML to be a little more compatible with TEI when mapping between the two. The ability to map inline TEI <note> to XHTML 2.0 is particularly of interest. (Btw, looking at XHTML 2.0 draft, I notice that for the block lists of <dl>, the new <nl> (for a navigational list!), <ol> and <ul>, that it now has facility to add a <label> tag, similar to the TEI <head> used within lists.) Jon (p.s., I used TEI Pizza Chef to generate a flattened DTD for the complete P4X. At least I think it is complete based on checking the various options at Pizza Chef. Here's the content model for the TEI <p> element -- notice it does not allow <lg> as a child: <!ELEMENT p (#PCDATA | abbr | address | date | dateRange | dateStruct | expan | geogName | lang | measure | name | num | orgName | persName | placeName | rs | time | timeRange | timeStruct | add | app | corr | damage | del | orig | reg | restore | sic | space | supplied | unclear | oRef | oVar | pRef | pVar | formula | handShift | distinct | emph | foreign | gloss | hi | mentioned | soCalled | term | title | ptr | ref | xptr | xref | caesura | c | cl | m | phr | s | seg | w | bibl | biblFull | biblStruct | castList | cit | q | quote | label | list | listBibl | note | witDetail | stage | camera | caption | move | sound | tech | view | table | text | anchor | addSpan | delSpan | gap | figure | alt | altGrp | certainty | fLib | fs | fsLib | fvLib | index | interp | interpGrp | join | joinGrp | link | linkGrp | respons | span | spanGrp | timeline | cb | fw | lb | milestone | pb)* > <!-- And for completeness, the ATTLIST for <p> --> <!ATTLIST p group CDATA #IMPLIED grpPtr IDREF #IMPLIED depend CDATA #IMPLIED depPtr IDREF #IMPLIED corresp IDREFS #IMPLIED synch IDREFS #IMPLIED sameAs IDREF #IMPLIED copyOf IDREF #IMPLIED next IDREF #IMPLIED prev IDREF #IMPLIED exclude IDREFS #IMPLIED select IDREFS #IMPLIED ana IDREFS #IMPLIED id ID #IMPLIED n CDATA #IMPLIED lang IDREF #IMPLIED rend CDATA #IMPLIED TEIform CDATA "p" > )