Project

Profile

Help

XSLT 2.0 functions, Saxon 8, and Ant

Added by Anonymous almost 20 years ago

Legacy ID: #2910467 Legacy Poster: Todd Reed (toddreed)

I have an XSLT 2.0 stylesheet that processes fine when I run Saxon 8.1.1 directly from the command line. When I try doing the same via Ant 1.6.2, I get the following error message: Fatal Error! Could not find function: regex-group I tried referencing this function as xsl:regex-group, which removes the above message, but produces a new error message: Error! java.lang.NoSuchMethodException: For extension function, could not find method java.lang.Double.regexGroup([ExpressionContext,] ). Cause: java.lang.NoSuchMethodException: For extension function, could not find method java.lang.Double.regexGroup([ExpressionContext,] ). I'm running Saxon from Ant with the xslt task: <xslt in="doc/Build Guide.xml" out="doc/Build Guide.tex" classpath="${env.ProgramFiles}/Local/saxon8/saxon8.jar" style="../../DocBook/StyleSheets/XSLT/latex/docbook.xsl"/> Why does my stylesheet work when running Saxon from the command line, but not when running from Ant?


Replies (2)

RE: XSLT 2.0 functions, Saxon 8, and Ant - Added by Anonymous almost 20 years ago

Legacy ID: #2910533 Legacy Poster: Michael Kay (mhkay)

The most likely explanation is that you are not running Saxon at all, but Xalan (which doesn't support XSLT 2.0 functions like regex-group). Try a pure 1.0 stylesheet, and output the value of system-property('xsl:vendor') to see whether this is the case. Michael Kay

RE: XSLT 2.0 functions, Saxon 8, and Ant - Added by Anonymous almost 20 years ago

Legacy ID: #2910588 Legacy Poster: Todd Reed (toddreed)

Yes, you are correct. The xsl:vendor system property is Apache Software Foundation. I was convinced I was using Saxon 8.1.1, because I have Ant configured on another machine successfully using Saxon 8.1.1 with XSLT 2 transforms, and I used this setup as a template. Now I know this is an Ant configuration issue. Thanks for the response.

    (1-2/2)

    Please register to reply