OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: SDD bogus

[ Lists Home | Date Index | Thread Index ]
  • From: James Clark <jjc@jclark.com>
  • To: Paul Prescod <papresco@technologist.com>
  • 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">
> ]>
> 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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)

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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS