Batch XSLT 2.0 transformations fail when using build file
Posted: Fri Nov 08, 2013 12:21 pm
Hi there,
I'm new to Oxygen and ANT build files and a friend of mine referred me to ANT build files to process batches of xml files with XSLT. When I run using only XSLT 1.0 functions, it is fine. When I add an XSLT 2.0 function (base-uri() - I need to grab the file name information for something), it then dies spectacularly when running it through the build file. When the XSL is run alone, it runs and generates what is wanted.
This is the message I receive when it fails to run:
Executing:
"c:\program files\oxygen xml developer 15\jre/bin/java" -Xmx256m -classpath "C:\Program Files\Oxygen XML Developer 15/tools/ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Developer 15/tools/ant" org.apache.tools.ant.launch.Launcher -f "build.xml"
Buildfile: J:\AA_Test\SessionsCourts\test\build.xml
dist:
[xslt] Transforming into J:\AA_Test\SessionsCourts\test\output
[xslt] Processing J:\AA_Test\SessionsCourts\test\content\001FH004.xml to J:\AA_Test\SessionsCourts\test\output\001FH004.xml
[xslt] Loading stylesheet J:\AA_Test\SessionsCourts\test\sessions.xsl
[xslt] : Error! Error checking type of the expression 'funcall(base-uri, [])'.
[xslt] : Fatal Error! Could not compile stylesheet
[xslt] Failed to process null
BUILD FAILED
J:\AA_Test\SessionsCourts\test\build.xml:4: Fatal error during transformation
Total time: 21 seconds
The process finished with exit code: 1
This is the contents of my build file:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="dist" name="ANTProject">
<target name="dist">
<xslt basedir="content/" destdir="output/" extension=".xml" excludes=".dtd" style="sessions.xsl"/>
</target>
</project>
To double check that the build file worked with only XSLT 1.0 functions, I commented out all references to the XSLT 2.0 items and it worked with no problems! As soon as I added them back in, failure!
Any suggestions would be more than welcome.
I'm new to Oxygen and ANT build files and a friend of mine referred me to ANT build files to process batches of xml files with XSLT. When I run using only XSLT 1.0 functions, it is fine. When I add an XSLT 2.0 function (base-uri() - I need to grab the file name information for something), it then dies spectacularly when running it through the build file. When the XSL is run alone, it runs and generates what is wanted.
This is the message I receive when it fails to run:
Executing:
"c:\program files\oxygen xml developer 15\jre/bin/java" -Xmx256m -classpath "C:\Program Files\Oxygen XML Developer 15/tools/ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Developer 15/tools/ant" org.apache.tools.ant.launch.Launcher -f "build.xml"
Buildfile: J:\AA_Test\SessionsCourts\test\build.xml
dist:
[xslt] Transforming into J:\AA_Test\SessionsCourts\test\output
[xslt] Processing J:\AA_Test\SessionsCourts\test\content\001FH004.xml to J:\AA_Test\SessionsCourts\test\output\001FH004.xml
[xslt] Loading stylesheet J:\AA_Test\SessionsCourts\test\sessions.xsl
[xslt] : Error! Error checking type of the expression 'funcall(base-uri, [])'.
[xslt] : Fatal Error! Could not compile stylesheet
[xslt] Failed to process null
BUILD FAILED
J:\AA_Test\SessionsCourts\test\build.xml:4: Fatal error during transformation
Total time: 21 seconds
The process finished with exit code: 1
This is the contents of my build file:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="dist" name="ANTProject">
<target name="dist">
<xslt basedir="content/" destdir="output/" extension=".xml" excludes=".dtd" style="sessions.xsl"/>
</target>
</project>
To double check that the build file worked with only XSLT 1.0 functions, I commented out all references to the XSLT 2.0 items and it worked with no problems! As soon as I added them back in, failure!
Any suggestions would be more than welcome.