Lists Home |
Date Index |
- From: James Clark <email@example.com>
- To: Paul Prescod <firstname.lastname@example.org>
- Date: Sat, 09 May 1998 11:36:31 +0700
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">
> <!ATTLIST MEMO SECURITY CDATA "TOP-SECRET">
> 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
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)
- SDD bogus
- From: Paul Prescod <email@example.com>