[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Sun Resolver classes released
Norman Walsh wrote: > > I'm pleased to announce that the set of Java classes that I wrote to > implement the OASIS XML Catalogs Committee Specification[1] for SAX > entityResolver() and JAXP URIResolver()s have been released[2]. > Hi Norm, In my docbook system, I use ant to call the parsers etc. to do the work. My system needs to know where the root of the system is so I pass this via a -D param to ant from a script. Other than this and one -D property if you move the root of where the documents are stored, there is no hardcoded paths etc. in the system. If you don't provide a CatalogManager.properties then the following occurs and it just hangs. html: [echo] Transforming: example.xml [echo] Into : /home/maxwell/pws/jdocbook/jdocbook_02/docroot/docs/example/example.html [java] Cannot find CatalogManager.properties [java] Cannot find CatalogManager.properties [java] Cannot find CatalogManager.properties [java] Cannot find CatalogManager.properties [java] Cannot find CatalogManager.properties [java] Cannot find CatalogManager.properties The example properties file uses a full path, not a relative path for the catalog. I put the following file in the classpath. #CatalogManager.properties verbosity=1 # Always use semicolons in this list catalogs=docbook-dtd/docbook.cat prefer=public static-catalog=yes allow-oasis-xml-catalog-pi=yes catalog-class-name=com.sun.resolver.Resolver I was hoping the system would use relative path from the classpath point where it found the CatalogManager.properties file and it doesn't work. I also tried a full path which works but is sub-optimal for me as this path is hardcoded in the property file. Here is the output which either way has the "Cannot parse" message. With no network it just hangs. It can't find the catalog so it tries to fall back and use the URL? html: [echo] Transforming: example.xml [echo] Into : /home/maxwell/pws/jdocbook/jdocbook_02/docroot/docs/example/example.html [java] Cannot parse verbosity: 1 I'm using xalan-j_2_2_D6 and here is how I am calling Xalan from ant. <java fork="true" classname="${xslt.processor}" classpathref="xalan.classpath"> <arg line="-IN ${input.file} -XSL file://${xhtml.driver} -OUT ${output.file} -URIRESOLVER com.sun.resolver.tools.CatalogResolver -ENTITYRESOLVER com.sun.resolver.tools.CatalogResolver"/> </java> Don't really know how to proceed but the wrapper provided by Marc-Aurčle for the old code worked great and I could pass the catalog as a system property which I think is perhaps an alternate way to pass the minimal property needed(the catalog) to the Resolver code. <java fork="true" classname="${xslt.processor}" classpathref="xalan.classpath"> <sysproperty key="xml.catalog.debug" value="0"/> <sysproperty key="xml.catalog.override" value="yes"/> <sysproperty key="xml.catalog.files" value="${catalog.file}"/> <arg line="-IN ${input.file} -XSL file://${xhtml.driver} -OUT ${output.file} -ENTITYRESOLVER ConfCatEntityResolver"/> </java> Anyway, hope this feedback is useful. Eric
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC