[WRT Gareth Reakes' original observation "XML Parsers still have to resolve the DTD for entities, even if you don't want to do validation."]
Jesse Pelton wrote on January 28, 2005: > I think that's correct. Non-validating parsers are allowed to process > external entities; they're just not required to. As the XML spec > (http://www.w3.org/TR/2004/REC-xml-20040204/#safe-behavior) makes clear, > the behavior of different non-validating parser implementations is less > predictable than that of validating parsers, precisely because they have > fewer requirements to meet. Xerces reads external entities, which > allows it detect well-formedness errors that it might otherwise miss and > supply the same document information to the application that a > validating parser would. In other words, Xerces' behavior is by design, > and intended to be useful. Yep, you're right. One slight observation/amendment: the use of the "standalone" declaration affects this. For a document with: <?xml version="1.0" standalone='yes'?> it is not useful for Xerces to process the external subset of the DTD. When standalone='yes', there can be no declarations in the external subset that (as you say) would [allow Xerces to] "detect well-formedness errors that it might otherwise miss and supply the same document information to the application that a validating parser would." > Presumably the DTD is in the documents you're processing because the > author(s) believed its contents to be useful. If you can convince the > author(s) that it's not useful, perhaps you can get it removed from the > document(s). In a standalone='yes' case with an external DTD, the author(s) are implicitly saying: 1) the DTD is useful for validation 2) the DTD is not required for well-formedness checking and its processing would not modify document information. In such a case, it might be nice not to process the external DTD. Regards, Michael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]