OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SAX 2.0 enhancement proposal

James Clark wrote:
To: Rob Lugt <roblugt@elcel.com>; <xml-dev@lists.xml.org>
Cc: <entity-resolution-comment@lists.oasis-open.org>
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;
> > }
> I think it's generally a good idea for XML parsers to pass applications
> 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
> 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.

Rob Lugt
ElCel Technology