T
thrill5
I have an xml document such as:
<device>
<element>first</element>
<element>second</element>
</device>
I am using this as the source for an xslt transform that goes like
<xsl:for-each select="/device/element>
This is the <xsl:value-of select="."/> element.
</xsl:for-each>
This would result in the following:
This is the first element
This is the second element
Is it possible to select the nodes in reverse order so that I would end up
with:
This is the second element
This is the first element
I can add a unique attribute to <element> if that would help such as:
<device>
<element id="1">first</element>
<element id="2">second</element>
</device>
Is there an XPath statement I can use in the <xsl:for-each> to select the
elements in reverse order using the attribute as an order tag?
Scott
<device>
<element>first</element>
<element>second</element>
</device>
I am using this as the source for an xslt transform that goes like
<xsl:for-each select="/device/element>
This is the <xsl:value-of select="."/> element.
</xsl:for-each>
This would result in the following:
This is the first element
This is the second element
Is it possible to select the nodes in reverse order so that I would end up
with:
This is the second element
This is the first element
I can add a unique attribute to <element> if that would help such as:
<device>
<element id="1">first</element>
<element id="2">second</element>
</device>
Is there an XPath statement I can use in the <xsl:for-each> to select the
elements in reverse order using the attribute as an order tag?
Scott