<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
________________________________________________________________________