The error you get is because your variable is a string (because value-of will always return a string) when you try to use it - the best way to do what you're trying is to select it like this:
This will select $currentPage if it's of type DienstPage - otherwise it will select the first ancestor (parent, parent's parent etc.) that is of type DienstPage.
xslt error node-set
hey guys..
i have a very strange xslt error which i cannot debug properly...
Below is my code.. I'm just trying to put a page in a variable... which i'm trying to use later...
But my slightest use of that variable currentSection gives me the following error:
To use a result tree fragment in a path expression, first convert it to a node-set using the msxsl:node-set() function
if i even tries to write out this codesnippet:
or even after searching this forum:
So what is the problem with my variable.. i just want the page that has been assigned to the variable currentSection.
Hope some of you can help me out..
thanks in advance
Hi Wiske
If you are trying to get the document alias maybe try $currentPage/name() - I haven't tested this but think I've got it right.
If you are trying to get the name of the page (ie what you named it when creating it) then you should use @nodeName
Hope this helps.
Nigel
Hi Wiske80,
The error you get is because your variable is a string (because value-of will always return a string) when you try to use it - the best way to do what you're trying is to select it like this:
This will select $currentPage if it's of type DienstPage - otherwise it will select the first ancestor (parent, parent's parent etc.) that is of type DienstPage.
/Chriztian
thanks chriztian... your pointers helped me alot...
is working on a reply...