xsl-list
[Top] [All Lists]

RE: need help with XSL statement (location path parenthesis problem)

2004-03-29 06:29:05
Hi,

In the following XML document, I need to be able to query the 
following:

1)  The number of reports which are coded with either an "a" or "b"
where the last code (in document order) which is either an 
"a" or "b" is
an "a".

*correct number is 3 *

  count(reportlist/report[code[(_at_)type = 'a' or @type = 'b'][last()]/@type = 
'a'])

2)  The number of reports which are coded with either an "a" or "b"
where the last code (in document order) which is either an 
"a" or "b" is
a "b".

*correct number is 1*

  count(reportlist/report[code[(_at_)type = 'a' or @type = 'b'][last()]/@type = 
'b'])

The "I'm on pain medication" disclaimer,

Jarno - Delerium: Forever After


<Prev in Thread] Current Thread [Next in Thread>