[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SAX 2.0 enhancement proposal
- From: James Clark <firstname.lastname@example.org>
- To: Rob Lugt <email@example.com>, firstname.lastname@example.org
- Date: Thu, 14 Jun 2001 12:18:53 +0700
> In my view, an improved EntityResolver interface (perhaps for SAX 3.0)
> be :
> interface EntityResolver
> public InputSource resolveEntity(java.lang.String name,
> throws SAXException, java.io.IOException;
> This would give the EntityResolver everything it needs to do the job. If
> wanted to absolutize the system identifier then it could do so, but it
> also have access to the bare value.
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
> 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
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').