First, my XML sample:
<docroot>
<datepoint rawtime="1199346540000" objid="4">
<issue severity="1">Random Issue #1</issue>
<issue severity="3">Random Issue #2</issue>
<issue severity="2">Random Issue #3</issue>
</datepoint>
<datepoint rawtime="1199346980500" objid="4">
<issue severity="3">Random Issue #1</issue>
<issue severity="3">Random Issue #2</issue>
<issue severity="2">Random Issue #3</issue>
</datepoint>
.
.
.
</docroot>
And here's my problem: how do I output each distinct "objid" (in my example, I only show one), its most recent "rawtime" (i.e. the max value), and the highest "severity" (i.e. the min value).
In the above XML sample, since I list only one objid, my desired output would be as follows:
OBJID = 4
RAWTIME = 1199346980500
SEVERITY = 2
Assuming I'm certain of OBJID 4's existence (in other words, I can directly access that set of nodes via "/docroot/datepoint[@objid=4]"), is there a way for me to apply aggregate functions such as "min" and "max" to complete the "select" below to derive the values I seek?
RAWTIME = <xsl:value-of select=""/>
SEVERITY = <xsl:value-of select=""/>
If that's not possible, which other way might I go about tackling this?
Thanks.
<docroot>
<datepoint rawtime="1199346540000" objid="4">
<issue severity="1">Random Issue #1</issue>
<issue severity="3">Random Issue #2</issue>
<issue severity="2">Random Issue #3</issue>
</datepoint>
<datepoint rawtime="1199346980500" objid="4">
<issue severity="3">Random Issue #1</issue>
<issue severity="3">Random Issue #2</issue>
<issue severity="2">Random Issue #3</issue>
</datepoint>
.
.
.
</docroot>
And here's my problem: how do I output each distinct "objid" (in my example, I only show one), its most recent "rawtime" (i.e. the max value), and the highest "severity" (i.e. the min value).
In the above XML sample, since I list only one objid, my desired output would be as follows:
OBJID = 4
RAWTIME = 1199346980500
SEVERITY = 2
Assuming I'm certain of OBJID 4's existence (in other words, I can directly access that set of nodes via "/docroot/datepoint[@objid=4]"), is there a way for me to apply aggregate functions such as "min" and "max" to complete the "select" below to derive the values I seek?
RAWTIME = <xsl:value-of select=""/>
SEVERITY = <xsl:value-of select=""/>
If that's not possible, which other way might I go about tackling this?
Thanks.