xsl-list
[Top] [All Lists]

RE: Totals for conditional sums ?maybe?

2005-12-05 09:22:17
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

--~------------------------------------------------------------------
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>
--~--