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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK-APPS: Sun Resolver Question


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







[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC