OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Mixed content?

[ Lists Home | Date Index | Thread Index ]


Jay Burgess wrote:

> Is there a way within a DTD to specify something like the following:
>
>       <!ELEMENT QuizPage (#PCDATA | Question+)*>

Not if you need to use mixed content. If you don't, I'd do something like:

    <!ELEMENT QuizPage   (OtherText?, (Question, OtherText?)+)>

and store the #PCDATA in the OtherText element. If it isn't necessary that the
constraint be enforced by the DTD or you do need to use mixed content, you
might consider doing a pass with Schematron - it would make light work of that
kind of checking. The element declaration could then be:

    <!ELEMENT QuizPage   (#PCDATA | Question)*>


--
Regards,

Marcus Carr                      email:  mrc@allette.com.au
___________________________________________________________________
Allette Systems (Australia)      www:    http://www.allette.com.au
___________________________________________________________________
"Everything should be made as simple as possible, but not simpler."
       - Einstein



  • References:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS