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