XSL - How to tell if element is last in series
- by Chris
I have an XSL template that is called (below). What I would like to do is be able to tell if I am the last Unit being called.
<xsl:template match="Unit[@DeviceType = 'Node']">
<!-- Am I the last Unit in this section of xml? -->
<div class="unitchild">
Node: #<xsl:value-of select="@id"/>
</div>
</xsl:template>
Example XML
<Unit DeviceType="QueueMonitor" Master="1" Status="alive" id="7">
<arbitarytags />
<Unit DeviceType="Node" Master="0" Status="alive" id="8"/>
<Unit DeviceType="Node" Master="0" Status="alive" id="88"/>
</Unit>