Deterministic behavior in processors
cowan at locke.ccil.org
Wed Aug 5 17:51:29 BST 1998
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
is to report:
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.
> does say that if these are in an external subset they can be neglected, I
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 at 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 at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev