You can't have a variable called $1. Call it say $x instead.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Jim Neff [mailto:jneff(_at_)blockvision(_dot_)com]
Sent: 07 February 2005 14:59
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Decimal precision
The error I am getting from Saxon is:
Error at xsl:choose on line 307 of file:/C:/Jim/xml/UHCML/format2.xsl:
Static error in XPath expression supplied to
saxon:evaluate: XPath syntax
error at char 9
in {sum(for $1 in}:
expected "<name>", found "<numeric-literal>"
Transformation failed:
Run-time errors were reported Process
c:\j2sdk1.4.2_06\bin\java exited with
code 2
Here is the complete code from the aforementioned "choose" statement:
<xsl:choose>
<xsl:when test="current()/evaluate = 'Y'">
<xsl:call-template name='pad_Field'>
<xsl:with-param name='justify'
select='current()/justification'/>
<xsl:with-param name='trunc' select='"Y"'/>
<xsl:with-param name='max' select='current()/length'/>
<xsl:with-param name='char' select='current()/data_type'/>
<xsl:with-param name='value'
select='saxon:evaluate(current()/content, $current_context)'/>
</xsl:call-template>
</xsl:when>
...
</xsl:choose>
Thanks,
Jim Neff
-----Original Message-----
From: Jim Neff [mailto:jneff(_at_)blockvision(_dot_)com]
Sent: Monday, February 07, 2005 9:55 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Decimal precision
I'm using Saxon.Net and I don't think it is up to 8.2 yet. I
hope to hear back from Pieter Siegers today to confirm this.
My point is, I have to stick with earlier version of Saxon
which may not allow what I want to do.
I'm actually using the saxon:evaluate() function. Here is
what is being
processed:
<content>sum(for $i in
$p1/provider/claim/claim_line/reimbursement_amount
return xs:decimal($i))</content>
And the calling XSLT code:
saxon:evaluate(current()/content, $current_context)
This works for other more simple commands but I'm wondering
if the for-in process cannot be handled in this manner.
I am using Saxon 8.1.1 from Saxonica.
Is there a way to make this decimal percision work with
saxon:evaluate() ?
Thanks,
Jim Neff
-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
x/y/xs:decimal() works only in Saxon 8.2. In earlier
releases you have
to write it as
for $x in x/y return xs:decimal($x)
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--