[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: DTD Question - PCDATA followed by an optional element

  • From: kragen@p... (Kragen Sitaker)
  • To: xml-dev@i...
  • Date: Wed, 17 Nov 1999 18:16:58 -0500 (EST)

pcdata optional
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

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!

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...)


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.