Thank you for replying, mrame.
My requirement is: I want to find all the nodes whose content ends with 'a' or 'A'. It's easy to do it for starts-with[], as you showed. However, I am working with Xslt 1.0 and I can't use ends-with[].
So what I am really looking for, is an XSLT 1.0 version of ends-with[].
This can be accomplished by the following code:
Code:
substring(node, start, end)
It can be written as this:
Code:
substring(.,string-length(.) -1, string-length(.) -1)
because . is the current node. string-length(.) takes the string length of this current node, subtracts 1 from it, meaning it begins at the last letter of the content (e.g. substring("sonya", string-length(.) -1, string-length(.) -1) can be translated as: substring("sonya", 5, 5) which would fetch the letter "a".
This is all I need. I need to fetch all nodes that end with 'a' or 'A'.
The problem I am having is that my editor says "is not a node set". So I am guessing that '.' is not a node set.
So all I need is to fetch the 'current node', so I can decide if it ends with an 'a' or 'A'. That's all.
