[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Mixed content?
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@a... ___________________________________________________________________ Allette Systems (Australia) www: http://www.allette.com.au ___________________________________________________________________ "Everything should be made as simple as possible, but not simpler." - Einstein
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|