Having the following xml document to play around:
1.- How to use a XSLT variable that holds a XPATH node set so we can use it as a variable in our XSLT.1 Article1 This is article 1 2 Article2 This is article 2 3 Article3 This is article 3
1.1.- Build the variable using xpath and only get the node set that is required using a predicate
1.2.- Use the variable same way we use xpath expression Here is the xslt:
Here is the output:
Name: Article1
Desc: This is article 1
Notes: You might need to include this in the namespace depending on which transformer you are using:
extension-element-prefixes="exsl"
This is an extension that allows to manipulate xml documents within a variable.
No comments:
Post a Comment