Re: SAX2: When to resolve System Ids
Michael Glavassevich <[email protected]> Wed, 31 Mar 2004 00:54:43 -0500
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <OFA34F9865.8E182AC7-ON85256E68.001ED581-85256E68.00207933@ca.ibm.com> |
"Karl Waclawek" <[email protected]> wrote on 03/31/2004 12:30:03 AM: > > > When I raised this a couple weeks ago, it got lost (possibly because these > > threads are getting fragmented between sax-devel and xml-dev) in the > > discussion on the canonical location for feature documentation. Either it > > was always intended that the systemId passed to > > DeclHandler.externalEntityDecl() be fully resolved or including this > > method among those affected by resolve-dtd-uris is an error. > > For now I have decided to implement it like the feature > documentation suggests, > as I fail to see why externalEntityDecl() should be treated differently. > Maybe I am overlooking something obvious. Two words... backwards compatibility. I believe the text in DeclHandler.externalEntityDecl() predates this feature. It says that systemId is the 'declared' system identifier. Xerces for instance reports the declared system identifier as it was specified in the document to DeclHandler.externalEntityDecl(). It reports an absolute URI for DTDHandler.notationDecl() and DTDHandler.unparsedEntityDecl(). It's what the javadoc says. I agree this doesn't make much sense, but changing the behaviour for DeclHandler.externalEntityDecl() now has the potential to affect users of SAX who rely on this parameter being the specified system identifier and not the one absolutized against a base URI. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected]