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

RE: Totals for conditional sums ?maybe?

Subject: RE: Totals for conditional sums ?maybe?
From: "Christopher Pierce" <Christopher.Pierce@xxxxxxxxxxx>
Date: Mon, 5 Dec 2005 11:22:17 -0500
unknown nodetype
Sorry for not providing the source or the full style sheet but the list
wouldn't even accpet the full style sheet as it is too large.  I promise
after I get through this one I either won't ever touch style sheets
again or I will read a book and not learn the language from the backend
of a terrible visual editor.

"I'm assuming here that transactionAmount does actually hold a numeric
value. You haven't shown your source document, but there's a possible
hint later in your question that suggests trasactionAmount might hold a
currency sign. If that's the case then in 2.0 you can do

sum(//AwardFullData/AwardItemizedLine[count(./periodLinePeriodNumber)&lt
;1]/
transactionAmount/number(translate(.,'$',''))"/>"

Any ideas if 2.0 isn't supported?  I'm receiving the error Unknown
nodetype: number.  If I try to use xml version 2.0 I receive "only
version 1.0 supported.

transactionAmount stores a text value(on the front end) ex: $1,000.00

I would need to sum the values and then format them (number-format?).



The general style sheet layout is:

for each select while condition
	display information
/for each

display totals where condition is met

for each select while condition2
	display information
/for each

display totals where condition2 is met

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.