[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Deterministic behavior in processors
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@c... 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@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|