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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Standalone declaration (was Re: diable <!DOCTYPE...>)



On xalan-dev, Tom Bradford wrote:
> I thought that if you added standalone="yes" to the <?xml?> prefix, the
> parser is supposed to avoid resolving the DTD.

(I'm cc'ing this to xml-dev, where followups should go)

The XML spec is a little vague on what the parser is supposed to do with
the standalone declaration. The spec doesn't actually say anything about 
parser behavior as far as standalone is concerned.
 
It just says that the document can indicate that declarations in its
external DTD subset will not affect the content of the document
(standalone="yes"), and that it is a validity constraint that this
assertion be true.

One wonders how the validity constraint can be tested without looking at
the external declarations. I'm thinking of how to know about default
attribute values; the presence of references to undeclared entities would
be enough to signal a violation.

Tim Bray's annotated XML spec explains "Neither the presence of the SDD
nor its value has any effect on the required behavior of the XML processor
or the application. (In fact, due to what is probably an error in the
specification, the processor is not even required to inform the app as to
its value). It is merely a statement of fact about the document, so that
if any downstream application needs to be really sure that it is seeing
the document exactly the same way as another application that used the
DTD, it will know when it has to go fetch and read the DTD."

Anyway... topic for another day.

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/