My xml file looks like below.
86
100
1.0
This transformation:
86_1.0
when applied on the provided XML document:
86
100
1.0
1.0
produces the wanted, correct result:
86
100
1.0
1.0
86_1.0
Explanation:
Using and overriding the identity rule/template -- the most fundamental and powerful XSLT design pattern.
Override on any element named name and creating an element named brlName (rename).
Override on the last last element child of the top element. Calling the identity rule by name for this node (copying) and then creating an element named drlName with a specific text-node child as per the requirements.
Using and overriding the identity rule/template is the most fundamental and powerful XSLT design pattern. You can learn more about it here.