[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Decimal precision

Subject: RE: Decimal precision
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Fri, 4 Feb 2005 14:33:34 -0000
decimal precision
> I've tried your answer for doing it "by hand" and here is
> what Saxon gives
> me:
>
> Warning: at xsl:value-of on line 13 of
> file:/C:/xml/UHCML/find-differing-claims.xsl:
>   Required item type of second operand of '/' is node();
> supplied value has item type
>   xs:decimal. The expression can succeed only if the supplied
> value is an empty sequence.
>
> Here is line 13 from my stylesheet :
>
> <xsl:value-of
> select="sum(claim/claim_line/reimbursement_amount/xs:decimal(.))" />
>
> Am I missing something here or is this just not possible
> without Schemas?

You need Saxon 8.2, the slash operator has only just been implemented (I
think...)

For older versions you should be able to do:

<xsl:value-of select="sum(for $i in
claim/claim_line/reimbursement_amount return xs:decimal($i))" />

(untested)

cheers
andrew

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.