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

Re: SDD bogus

  • From: James Clark <jjc@j...>
  • To: Paul Prescod <papresco@t...>
  • Date: Sat, 09 May 1998 11:36:31 +0700

Re: SDD bogus
Paul Prescod wrote:

> I'm concerned because I believe
> this to be a valid XML document:
> <?xml version="1.0" standalone="yes"?>
> <!DOCTYPE MEMO SYSTEM "http://www.sgmlsource.com/memo.dtd" [
> <!ENTITY % mess-everything-up SYSTEM "mess.ent">
> ]>
> In my opinion, section 5.1 will require the non-validating parser to skip
> the attribute list declaration, even if memo.dtd is an empty file.

This is very good point.

Your example isn't quite right: the entity must be referenced.  Also a
non-validating parser only has to skip the ATTLIST declaration if it
skips the entity reference.  Apart from this, your interpretation of 5.1
is the obvious one.  Expat behaves consistently this.

I think this is a serious problem, because it breaks the principle that
if you declare your document as standalone=yes and validate it, then you
will get the same result when you parse it with any non-validating
parser (which to me is the point of the SDD).

I think a bit of creative interpretation would be in order. Section 5.1

 [Non-validating processors] must not process
 entity declarations or attribute-list declarations encountered after a 
reference to a parameter entity that is not read, since the
 entity may have contained overriding declarations. 

The "since" clause is false when standalone=yes, so I think this can
fairly be said to be an inconsistency in the spec (rather than simply a
poor design choice), which should be resolved by not applying this
requirement when standalone=yes.

The other way to fix this would be to tweak the definition of standalone
to say that declarations after the first reference to an external
parameter entity count as external for the purposes of determining
whether the document is standalone.

This is clearly needs to be fixed one way or the other.

> Despite its reputation to the contrary,
> XML is intricate and deep and I may have missed something important.

Yes. Entities and the SDD are both tricky: the interaction of the two is
particularily so.


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/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)

  • References:
    • SDD bogus
      • From: Paul Prescod <papresco@t...>


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.