Subject: Re: [xsl] better way to get the path to a node? From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Sat, 01 Dec 2012 11:28:28 +0100 |
Greetings --
If I want to return the XPath path to a specific node when that node is the context node, is there a better way than:
<xsl:sequence select="string-join(ancestor-or-self::*/concat('/',name(),'[',for $x in . return count(preceding-sibling::*[name() eq $x/name()])+1,']'),'')"/>
"Better" here means "more efficient"; I'll be using various Saxon 9.* for this, either in oXygen or from java.
Martin Honnen --- MVP Data Platform Development http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Thread | Re: [xsl] better way to get the pat, Graydon | |
Date | Re: [xsl] better way to get the pat, David Carlisle | |
Month |