[Home] [By Thread] [By Date] [Recent Entries]

  • From: Rob Lugt <roblugt@e...>
  • To: James Clark <jjc@j...>, xml-dev@l...
  • Date: Thu, 14 Jun 2001 07:19:25 +0100

James Clark wrote:
To: Rob Lugt <roblugt@e...>; <xml-dev@l...>
Cc: <entity-resolution-comment@l...>
Sent: 14 June 2001 06:18
Subject: Re: SAX 2.0 enhancement proposal


> > In my view, an improved EntityResolver interface (perhaps for SAX 3.0)
> would
> > be :
> >
> > interface EntityResolver
> > {
> >     public InputSource resolveEntity(
> >             java.lang.String name,
> >             java.lang.String publicId,
> >             java.lang.String systemId,
> >             java.lang.String baseUri)
> >     throws SAXException, java.io.IOException;
> > }
<snip/>
>
> I think it's generally a good idea for XML parsers to pass applications
both
> the system id and the base URI: it provides a little bit more flexibility.
> The interfaces to both expat and XP do this.
>
> If you change this, you also need to change DTDHandler to pass a baseURI
and
> the system ID. This would align better with the infoset
>
> http://www.w3.org/TR/xml-infoset/#infoitem.entity.unparsed
>

Yes, I agree the proposal should be extended to include the methods on
DTDHandler for consistency.

> > I propose a simple extension to SAX 2.0 in
> > the guise of a new standard feature:
> > http://xml.org/sax/features/absolutize-system-identifiers.  The default
> > value could be "true" to maintain compatibility with existing systems.
> > Applications could set it to "false" when they want a conforming catalog
> > processor.
>
> You need both the base URI and the unabsolutized system ID.  I would use a
> hack like having the systemId arg contain both the base URI and the system
> ID separated by some character that is not allowed in XML (such as '\0').
>

You are right.  When I penned this proposal the XML Catalog draft spec had
no need for the baseURI but I think the next draft will do.  Your suggestion
works for me.  This is probably easier that other alternatives, such as
creating a SAX property to hold the current baseURI.

Thanks for your input.

Regards
Rob Lugt
ElCel Technology



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member