Subject: Re: [xsl] better way to get the path to a node? From: David Carlisle <davidc@xxxxxxxxx> Date: Sat, 01 Dec 2012 12:05:47 +0000 |
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.
Instead of generating /h:html[1]/h:body[1]/m:math[1]
-- google plus: https:/profiles.google.com/d.p.carlisle
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] better way to get the pat, Dimitre Novatchev | Thread | Re: [xsl] better way to get the pat, Graydon |
Re: [xsl] better way to get the pat, Martin Honnen | Date | Re: [xsl] better way to get the pat, Graydon |
Month |