Re: [xsl] extract xpath locator

Subject: Re: [xsl] extract xpath locator
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 11 Aug 2004 12:37:10 +0100
<xsl:template match="doc/*">
 <xsl:variable name="x">
   <xsl:copy-of select="preceding-sibling::node()"/>
 </xsl:variable>

 from: <xsl:value-of select="string-length($x)+1"/>
   to: <xsl:value-of select="string-length($x)+string-length(.)+1"/>
</xsl:variable>

Note that 

<doc>
	This <i>is</i> a <b>T</b>est
</doc>

by my counting i contains characters 8 and 9 not 6 and 7
the content of doc being

newline,tab,T,h,i,s,space,i

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread