This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Sun Resolver Question
- From: Eric Richardson <eric dot richardson at milagrosoft dot com>
- To: docbook <docbook-apps at lists dot oasis-open dot org>
- Date: Sat, 20 Apr 2002 16:44:23 -0700
- Subject: Re: DOCBOOK-APPS: Sun Resolver Question
- Organization: MilagroSoft Inc.
- References: <3CBF0C8C.1030302@milagrosoft.com>
Eric Richardson wrote:
> Hi,
>
> I'm trying to get Ant to use the catalog code so I'm trying to pass a
> -D<resolver property-unknown>=com.sun.resolver.tools.CatalogResolver to
> ant. I traced the ant code and it passes the -D into the system
> properties so it should work if Xerces2 will use it internally.
>
> Is there a property I can set that will get the SAXReader to use the
> CatalogResolver in Xerces2?
>
> The Sun resolver has the wrapper for xp and xt for the parser. I see
> there is a org.xml.sax.driver property, so is there a
> org.xml.sax.resolver property or a driver or something for xerces?
I dug into this pretty extensively but still don't understand it all. It
seems that there are three -D<name>=<value> that java understands. The
names are as follows.
javax.xml.parsers.SAXParserFactory
javax.xml.parsers.DocumentBuilderFactory
org.xml.sax.parser
Passing one of these with the value of an appropriate class file should
force JAXP in the first two to use the passed in class file. Likewise
for the SAX parser. I have not tried this out yet.
I looked at the source code for ant and they do the following. First
they do a class.forName on the javax.xml.parsers.SAXParserFactory which
forces a SAXParserFactory class into memory if it is found. Later they
do SAXParserFactory.newInstance(). Later they use their own version of
an entity resolver so I don't think any attempts to use the resolver
will work with at least ant 1.4.1. I wanted internal subsets to use
Norm's entity resolver so shared properties and targets in ant could be
held in one location for the ease of maintainability.
I still would like to know which class of the resolver would be
appropriate for the SAXParserFactory or if the new resolver code has to
be used at a lower level as used in Xalan. This question is for the
xerces2 parser as the documentation shows hoe for xp and xt.
Any help appreciated,
Eric