I have a template for a given doc type that i use all over the place and include into a number of xslt macros. Now I want to reuse the same template with some content xml that has a different schema but has nodes (properties) that I can "map" to similar fields in the given template. Is it possible to create a node set in my xslt file, assign it to a variable and pass that to the tempate as a param?
Hope that all makes sense.
I could do it in an extension but it seems a bit overkill to me.
Create an XSLT nodeset to pass to template
I have a template for a given doc type that i use all over the place and include into a number of xslt macros. Now I want to reuse the same template with some content xml that has a different schema but has nodes (properties) that I can "map" to similar fields in the given template. Is it possible to create a node set in my xslt file, assign it to a variable and pass that to the tempate as a param?
Hope that all makes sense.
I could do it in an extension but it seems a bit overkill to me.
Hi Janusz
This sound like something that should be possible.
Could you perhaps provide some snippets of the code you already have and the stuff that needs to be transformed?
/Jan
Hi Janusz,
You can build a variable containing XML and use the node-set() function to be able to perform XPath querying or applying templates etc.:
/Chriztian
is working on a reply...