[
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
|