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

Re: What [Standalone document declaration]

  • From: "Ramesh Gupta" <ramesh@e...>
  • To: xml-dev@x...
  • Date: Wed, 28 Jun 2000 17:05:57 -0700

stand alone document
> In a standalone document declaration, the value "yes" indicates that there
> are no markup declarations external to the document entity (either in the
> DTD external subset, or in an external parameter entity referenced from the
> internal subset) which affect the information passed from the XML processor
> to the application. The value "no" indicates that there are or may be such
> external markup declarations.
> "Note that the standalone document declaration only denotes the presence of
> external declarations; the presence, in a document, of references to
> external entities, when those entities are internally declared, does not
> change its standalone status."
> Can somebody please explain me the (quoted) last sentence? I cannot, without
> help, make much sense about it!


Normally, external subsets only contain DTD declarations that describe a
document's structure that a validating parser must read in order to process
the document correctly.

However, to allow a *non-validating* parser to skip such external
declarations, one may specify standalone="yes", provided of course, that the
external subset is indeed *not* required to interpret the document's content
correctly. This is true only if the external subset does not "affect the
information passed from the XML processor to the application".

For example, if the external declarations contain default attribute values,
then even a non-validating parser must look at the external declarations to
process the document correctly.

For your real question, you need to parse the quoted sentence carefully,
keeping in mind the difference between an entity *declaration* and an entity
*reference*. Now, entities can be declared in three different ways:
(i) declared in the document instance itself, such that it directly holds
the content of the entity;
(ii) declared in the document instance, but the declaration points to a file
that holds the content of the entity;
(iii) declared in an external subset;

The sentence that is troubling you relates specifically to (ii) above. It
means that for an entity that is declared *in* the document instance, the
document should not be deemed as a *non-standalone* document just because
the *contents* of the entity are held in an external document -- Note the
use of double negatives here -- I could not find a better way to phrase it.

Hope this helps,

Ramesh Gupta

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/


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.