This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XPath position of character in element
- From: "Michael Earls" <michael at cerkit dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 17 Apr 2002 09:37:46 -0400
- Subject: RE: [xsl] XPath position of character in element
- Reply-to: xsl-list at lists dot mulberrytech dot com
For 1 based answer:
The position of 'e' is <xsl:value-of
select="string-length(substring-before(tag,'e')) + 1"/>
For 0 based answer:
The position of 'e' is <xsl:value-of
select="string-length(substring-before(tag,'e'))"/>
Michael Earls
-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of Nicolas
Mazziotta
Sent: Wednesday, April 17, 2002 9:19 AM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] XPath position of character in element
Hello,
does anybody know how to get the value of the position of a character in
an element?
e. g. : in <tag>abcdefg</tag>, the position of e is 5.
Thank you.
N. Mazziotta
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list