Subject: RE : RE : [xsl] XPath position of character in element From: "Nicolas Mazziotta" <Nicolas.Mazziotta@xxxxxxxxx> Date: Wed, 17 Apr 2002 16:33:42 +0200 |
Thank you. > -----Message d'origine----- > De : owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl- > list@xxxxxxxxxxxxxxxxxxxxxx] De la part de Michael Earls > Envoyé : mercredi 17 avril 2002 16:25 > À : xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Objet : RE: RE : [xsl] XPath position of character in element > > Use a recursive template. > > Once you have the first answer, call the template from within itself > using substring-after(tag,'e') as a parameter > > (reference: xsl:call-template, xsl:with-param, substring-after, > recursive templates) > > > Michael Earls > > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Nicolas > Mazziotta > Sent: Wednesday, April 17, 2002 9:50 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE : [xsl] XPath position of character in element > > > I was not accurate enough: > > what in > > <tag>eabcdefg</tag>, the positions of e is 1 and 6. > > and > > <tag>eab<tag2>cdef<tag2>g</tag>, the positions of e in <tag> is 1 and 6? > > N. Mazziotta > > -----Message d'origine----- > De : owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] De la part de Michael > Earls Envoyé : mercredi 17 avril 2002 15:38 À : > xsl-list@xxxxxxxxxxxxxxxxxxxxxx Objet : RE: [xsl] XPath position of > character in element > > 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@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Nicolas > Mazziotta > Sent: Wednesday, April 17, 2002 9:19 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > 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 > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: RE : [xsl] XPath position of ch, Michael Earls | Thread | RE: [xsl] XPath position of charact, Michael Kay |
Re: [xsl] Setting attributes of FO , David Carlisle | Date | RE: RE : [xsl] XPath position of ch, Jarno . Elovirta |
Month |