Subject: Re: [xsl] top ancestor value From: Joelle Tegwen <tegwe002@xxxxxxx> Date: Fri, 20 Oct 2006 17:02:46 -0500 |
I tried using youth:ancestor-or-self::section[last()]/folder, but that gives me a validation error.
its the element name in the namepsace,not the axis
ancestor-or-self::youth:section[last()]/youth:folder
(guessing, as you didn't show the input)
on the otehr hand rather than going all the way up each time, you could just start from the other end
/a/b/youth:section/youth:folder
if th etop level section is at some known position relative to th eroot of the document.
As its a constant you can make it a global variable
<xsl:variable name="path" select="/a/b/youth:section/youth:folder"/>
then you can just use $path
ie replace by
<a href="{$path}/{youth:url}">
David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] top ancestor value, David Carlisle | Thread | Re: [xsl] top ancestor value, David Carlisle |
Re: [xsl] top ancestor value, Dimitre Novatchev | Date | Re: [xsl] top ancestor value, Joelle Tegwen |
Month |