You need to put the last()
indexing on the nodelist result, rather than as part of the selection criteria. Try:
(//element[@name="D"])[last()]
More Related Contents:
- XSLT string replace
- how to escape single quote in xslt substring function
- Why do indexes in XPath start with 1 and not 0?
- XPath find if node exists
- How to use starts-with() , contains() and ends-with() in XPath to find the xml node innertext? in XPATH 1.0
- How to concat a string to xsl:value-of select=”…?
- Display an XML attribute value only on the first encounter with XSL
- XSLT with XML source that has a default namespace set to xmlns
- Case insensitive XPath contains() possible?
- Why does XSLT output all text by default?
- how to apply group by on xslt elements
- Producing a new line in XSLT
- XSLT: How to convert XML Node to String
- Check if a string is null or empty in XSLT
- XPath with multiple conditions
- Using an HTML entity in XSLT (e.g. )
- XSLT: How to change an attribute value during ?
- Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP?
- Finding the difference between two dateTimes in XSLT
- XSLT Replace function not found
- How to execute XSLT 2.0 with ant?
- XSLT generate UUID
- Tokenizing and sorting with XSLT 1.0
- What is the difference between ‘or’ and ‘|’ when programming in xslt?
- Conver EDT to GMT in XSLT 1.0
- Adding element in middle of xml using xslt
- WiX Installer: using xslt with heat.exe to update attributes
- Inserting a line break in a PDF generated from XSL FO using
- Removing empty tags from XML via XSLT
- XSLT Bitwise Logic