Re: DTD Question - PCDATA followed by an optional element
Norman Samuelson asks: >To include the comment, I would like to be able to simply say: > > <!ELEMENT comment (#PCDATA)> > <!ELEMENT rho0 (#PCDATA, comment?)> > >That doesn't seem to be acceptable. I also tried: > > <!ELEMENT rho0 ((#PCDATA) | (#PCDATA, comment))> > >Is it possible to do what I want? No. Section 3.2.2 of REC-xml: An element type has mixed content when elements of that type may contain character data, optionally interspersed with child elements. In this case, the types of the child elements may be constrained, but not their order or their number of occurrences: The best you can do is (#PCDATA|comment)*. -- <kragen@p...> Kragen Sitaker <http://www.pobox.com/~kragen/> The Internet stock bubble didn't burst on 1999-11-08. Hurrah! <URL:http://www.pobox.com/~kragen/bubble.html> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
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