You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Robert Koberg <ro...@koberg.com> on 2003/05/13 22:09:04 UTC
xslt/style xmlcatalog and XSL document()
Hi,
I am trying to use the core xslt/style task with an xmlcatalog
(URIResolver). The xsl:include's come in fine but using the XSL document
function I get the error below. The XSL might look like:
<xsl:apply-templates select="document('c000001')/*"/>
--------------------------------------------
The build.xml snipped:
<property name="tams.dev.site" value="../../dev.tams.livestoryboard.com"/>
<xmlcatalog id="site">
<entity publicId="c000001" location="./content/c000001.xml"/>
<entity publicId="xsl_find_xml"
location="./styling/lsb_overrides/find_xml.xsl"/>
</xmlcatalog>
<target name="generate">
<mkdir dir="${tams.dev.site}/hoo/boo"/>
<xslt in="site.xml" out="${tams.dev.site}/hoo/boo/index.html"
style="styling/default.xsl">
<xmlcatalog refid="site"/>
</xslt>
</target>
--------------------------------------------
The error:
[xslt]
c:/hsphere/local/home/tams/dev.tams.livestoryboard.com/WEB-INF/styling/lsb_o
verrides/find_xml.xsl:44:17: War
ning! Can not load requested doc: Programmer's Error! putDocumentInCache
found reparse of doc: file:///c:/hsphere/local
/home/tams/dev.tams.livestoryboard.com/WEB-INF/C:/hsphere/local/home/tams/de
v.tams.livestoryboard.com/WEB-INF/content/c0
00001.xml
It seems that the resolver is using the basedir from the ant build, not the
directory from the calling XSL. So, I setup the xmlcatalog to use this
location. But I always get the full path to the resolved resource appended
to the project's basedir.
What do I need to do to get the resolution correct?
I wanted to try saxon instead of the default. How do I set the
TransformerFactory? I tried:
ant
-Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImp
l generate
Thanks for any help,
-Rob