ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Use of XML Catalog with Ant (xslt task) - request for example
Date Fri, 20 Sep 2013 16:52:45 GMT
On 2013-09-20, Kerry, Richard wrote:

> Thank you Stefan, that was very helpful, and informative regarding the path loading issues.

> I'm now definitely making some progress.

Sounds good.

> I've passed in ${resolverpath} via "-lib" and have ${catalogpath} in my <xmlcatalog>.

> Where ${resolverpath} is the full path, including ".jar", and
> ${catmanpath} is the full path to Catalog.xml.

> I now get :

> Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource
META-INF/services/javax.xml.parsers.SAXParserFactory from C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml

This says Java thinks Catalog is jar - you're likely using ${catmanpath}
as part of something taht ends up on a classpath like thingy.  The
message might look anoying but doesn't do any harm in itself.

It likely is a remnant of your many attempts to get it working so far.
I must admit I feel sorry for the time you've already spent on this and
wish there was an easier way.  Me I haven't used xmlcatalog so far and
am just approaching it with some general knowledge how Ant works
internally.  Many thanks for your patience.

> "I don't think the properties file is required at all. "

> But, the properties file contains a control for verbosity, which can
> be useful in diagnosing problems within it.

I see.

> Is there another way of controlling that ?

I don't think so.  I'd try to put the properties file into the classpath
as well, i.e. add a -lib pointing to the directory holding the
properties file.  I'm not sure this will help.

> "[xslt] Loading stylesheet C:\Projects\Tools_RK\DocBook-System\WebHelp\CustomWebHelp.xsl"

> "resolve: 'webhelp/xsl/webhelp.xsl' with base: 'file:/C:/Projects/Tools_RK/DocBook-System/WebHelp/CustomWebHelp.xsl'

...

>      [xslt] : Error! C:\Projects\Tools_RK\DocBook-System\WebHelp\webhelp\xsl\webhelp.xsl
(The system cannot find the path specified)"

> There is an xsl:import of 'webhelp/xsl/webhelp.xsl' in
> CustomWebHelp.xsl, so the first line of this block makes some sense.

> However, there is no
> C:\Projects\Tools_RK\DocBook-System\WebHelp\webhelp\xsl\webhelp.xsl,
> so although that Error line is correct I don't know why it's trying as
> there is a 'webhelp/xsl/webhelp.xsl' entry within Catalog.xml.

I'm just guessing here.  C:\Projects\Tools_RK\DocBook-System\WebHelp
seems to be your project's basedir and this is the default location to
resolve relative paths against.

xmlcatalog is supposed to resolve public ids, I must admit I don't know
what the transformer passes in a publicId to the URIResolver if the
import is a relative path.

Hmm, this
<http://xerces.apache.org/xml-commons/components/resolver/resolver-article.html>
suggests the URIResolver (which is used for xsl:import) applies to 
         <uri name="uri" uri="alternateuri"/>
entries only.  Is this what you have inside of your catalog?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message