I will try to explain what I am trying to accomplish, based on multiple querystrings I am trying to filter a set of nodes using multiple templates. That atleast was my initial thought, but I got stuck when trying to pass the filtered nodes on to the next template.
[code]
......
......
[/code]
I have also tried
[code][/code]
and
[code][/code]
But I can't really see why nothing seems to work. I guess some of you XSLT-guru's out there can see what I am doing wrong :)
I think it has something to do with the conditionals [].
When you use a condition like that, you no longer have a node set, you have a node-result set (or something). To convert that into a node set again, try surrounding it with msxsl:node-set(). something like:
I don't remember if you have to add something to the top of the stylesheet to get it working, but this should get you started.
thanks mortenbock! I however ended up using an xsltextension that created the xpath based on multiple querystrings and returned the nodeset.
The xslt got too messy and hard to follow..
XSLT nodeset Question
Hi,
I will try to explain what I am trying to accomplish, based on multiple querystrings I am trying to filter a set of nodes using multiple templates. That atleast was my initial thought, but I got stuck when trying to pass the filtered nodes on to the next template.
[code]
......
......
[/code]
I have also tried
[code][/code]
and
[code][/code]
But I can't really see why nothing seems to work. I guess some of you XSLT-guru's out there can see what I am doing wrong :)
Any input is appreciated.
I think it has something to do with the conditionals [].
When you use a condition like that, you no longer have a node set, you have a node-result set (or something). To convert that into a node set again, try surrounding it with msxsl:node-set(). something like:
I don't remember if you have to add something to the top of the stylesheet to get it working, but this should get you started.
I've got exactly the same problem...
When I add this function I get
System.Xml.Xsl.XslLoadException: Prefix 'msxsl' is not defined. An error occurred at ...
What do I have to include?
]>
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
Hiya Cheesey toastie,
This is to do with the header stuff as you seem to be aware of.
You need to add this line which adds the namespace so you can use the functions in that.
[code]
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
[/code]
Then you need to add msxsl to the line exclude-result-prefixes
Hey presto all solved !
Warren
thanks mortenbock! I however ended up using an xsltextension that created the xpath based on multiple querystrings and returned the nodeset.
The xslt got too messy and hard to follow..
Thanks Warren, I did get that working but couldn't get the syntax right for the node-set. I switched to calling a template with a
is working on a reply...