Problem with script
Posted: Fri Feb 08, 2008 12:15 am
If I run the code below in the debugger (Oxygen 9.1 on Vista) it gives appropriate output for an appropriate input document. When I try to run from the command line with:
I receive this error listing:
However if I compile and then run in this fashion:
everything works fine.
I have taken care to make certain that I am running the Saxon 9B processor from both the command line and within the Oxygen debugger.
It is of course a pain to do both steps each time. I am curious if Oxygen is doing the two-step process internally, and if not, what are the options passed the the Saxon processor. I am pretty certain I've never encountered this problem with earlier versions of Oxygen.
Here is the code for 'this.xsl':
Code: Select all
java net.sf.saxon.Transform my.xml this.xml
Code: Select all
Warning: at xsl:transform on line 4 of file:/c:/sil/digpub/ll/src/DocBook2LGM/s2.xsl:
Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
Error on line 10 of file:/c/this.xsl:
XPTY0004: Arithmetic operator is not defined for arguments of types (numeric, xs:double)
Failed to compile stylesheet. 1 error detected.
Code: Select all
java net.sf.saxon.Compile this.xsl this.xsc
java net.sf.saxon.Transform -c:this.xsc my.xml
I have taken care to make certain that I am running the Saxon 9B processor from both the command line and within the Oxygen debugger.
It is of course a pain to do both steps each time. I am curious if Oxygen is doing the two-step process internally, and if not, what are the options passed the the Saxon processor. I am pretty certain I've never encountered this problem with earlier versions of Oxygen.
Here is the code for 'this.xsl':
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet >
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="/">
<xsl:value-of select="(sum(item/a/@val)* 100)"/>
</xsl:template>
</xsl:transform>