Print

Print


On Mon, 11 Nov 1996, Outi H. Lehtinen wrote:
 
> I have ran into a strange problem: I can't put a <p> inside a <q>.  The
> Green Book of TEI says that following is a valid stucture:
>
>   <q type=letter>
>     <p>Some text here.</p>
>     <p>Some text here.</p>
>   </q>
>
 
If you expand the declaration for q, it looks like this:
 
<!ELEMENT q - - (
                    (
                       ( l | lg | p | sp ), ( [...] | l | lg | p | sp |  q )*
                    )
                       |
                    ( #pcdata | [...] | q | [...] )*
                ) >
 
 
Notice that p appears in the first subset which has no #pcdata, but
doesn't appear in the second, which can include #pcdata.  So, if you want
to mind your p's and q's (!), make sure there isn't any white space
between the children p's, which will make nsgmls think you are in subset
2:
 
        <q><p>blah blah blah</p><p>blah blah blah</p></q>
 
Notice, however, that you can do this:
 
        <p>blah blah blah <q>foo bar</q> blah blah blah</p>
 
 
Hope this helps.
 
 
- Gregory Murphy
CETH, the Center for Electronic Texts