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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Deterministic behavior in processors

[ Lists Home | Date Index | Thread Index ]
  • From: John Cowan <cowan@locke.ccil.org>
  • To: XML Dev <xml-dev@ic.ac.uk>
  • Date: Wed, 05 Aug 1998 11:50:24 -0400

Peter Murray-Rust scripsit:

> I have briefly re-read the spec and it's not immediately clear to me where
> it says that a NVP is allowed to neglect [external parseed entities]
>a and b if it's feeling lazy.

Clause 5.2:  "[A] non-validating processor [...] need not read any part
of the document other than the document entity."  In particular, it
need not incorporate the content of external parsed entities, it need
not read the external subset, and it need not read external parameter
entities.  If it doesn't read them, it must also not process certain
other declarations so as not to get an inconsistent result with
parsers that do read external entities.

Unfortunately, SAX 1.0 lacks any way for an NVP to even report that
it is failing to process references to external parsed entities; 
about all such a parser can do on reading

	<FOO>&a;&b;</FOO>

is to report:

	startElement("FOO")
	endElement("FOO")

IMHO this is a *fundamental* deficiency in SAX; there is no way for a
parser even to report that it is dropping part of the document's content
on the floor.  Such a SAX parser wouldn't even invoke its
EntityResolver, since it doesn't care about resolving entities.

> (It
> does say that if these are in an external subset they can be neglected, I
> think.)

Since the whole external subset can be ignored, *a fortiori* any
external entity declarations in it may never be processed.

> I *can't* use a validating parser because
> it's impossible to construct a DTD for the complex information in a.xml and
> b.xml (uses at least 4 namespaces). I don't want a parser which bombs on
> the first 'invalidity' fatal error - i.e. doesn't have a DTD.

I think this is a conceptual error on your part.  A validating parser
checks that the document it is parsing conforms to its DTD.  A
document without a DOCTYPE declaration genuinely doesn't have a DTD:
a validating parser then merely checks it for well-formedness.  It is
never an error not to have a DTD.

-- 
John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)

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)





 

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

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