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

Re: Element Occurrence and #PCDATA


pcdata
Dan,

> Is the syntax (#PCDATA)* ever meaningful?

Essentially what this says is that you may have any number of repeating
#PCDATA sections. So imagine you had a #PCDATA section that said "Dan" and
one that said "Mabbut"-- now put them together: "Dan Mabbut" technically
this is a single #PCDATA section not two together right? Essentially it has
meaning but the only time this is important is when you have mixed element
content like:

<p>Dan Mabbut<i>is</i>very<b>great</b>!</p>

Here we do have multiple #PCDATA sections which are separated by elements
(hence the phrase "mixed content"). You would declare this as follows:

<!ELEMENT p (#PCDATA | i | b)*>

Notice the similarity-- this time instead of having a repeating choice for
only #PCDATA we have a repeating choice for #PCDATA, <i>, and <b> as our
element content. (#PCDATA must always come first in mixed content
definitions).

Back to your original question: (#PCDATA)* is just a watered down mixed
content definition-- there are just no child elements in the mix. Therefore
this definition is allowed-- but it is unnecessary-- in any situation where

    (#PCDATA)*

will work--

    (#PCDATA)

will work also.

I am sure you knew most of this-- hope this answers the question--

Jeff Rafter
Defined Systems
http://www.defined.net
XML Development and Developer Web Hosting



PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.