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

Re: When to check entity WFness according to 4.3.2


entity well formed
 > The requirement is that "Each of the parsed entities which is
 > referenced directly or indirectly within the document is well-formed."
 > An entity is certainly *declared* in the prolog, but it is not
 > *referenced* there.

It can be referenced there in an attribute value declaration but that is 
really not the point. I have to agree with Karl, and must admit to being 
very frustrated by the opaqueness of the recommendation in this area. I 
have spent three days retrofitting a parser to perform a check that was 
not necessary-- and I am sure I am not the only person to have done so.

 > The requirement is that "Each of the parsed entities which is
 > referenced directly or indirectly within the document is well-formed."

Is *far* more clear than

   "4.3.2 The document entity is well-formed if it matches the
    production labeled <document>."

Which links to:

   "[1] document ::= prolog element Misc*"

If at that point you return to your reading in 4.3.2 you encounter:

   "An internal general parsed entity is well-formed if its
    replacement text matches the production labeled content."

By then you already missed the boat. You forgot to check what the 
implications of a wellformed *textual object* is-- which happens to 
include the <document> production-- but is not referenced anywhere in 
section 4.

I agree that there needs to be some sort of erratum here to clarify 
things. At worst, I would love to see "well-formed" in "An internal 
general parsed entity is well-formed" be turned into a link that points 
to http://www.w3.org/TR/REC-xml/#sec-well-formed.

But a clarification sentence of something like:

   "Internal general parsed entities should only be checked for\
    well-formedness if they are <included> or <included in literal>"

would help immensely. For most implementers this is a confusing area and 
can be clarified quite easily.

Thanks
Jeff Rafter

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.