Subject: Re: [xsl] How to get the preceding-sibling of parameter context node[URGENT] From: Joerg Pietschmann <joerg.pietschmann@xxxxxx> Date: Thu, 14 Feb 2002 09:45:37 +0100 |
Mailer Mailer <maillistboxes@xxxxxxxxx> wrote: ... > <xsl:template name="mytemplate"> > <xsl:param name="contextnode"/> > <xsl:for-each select="$contextnode"> > <xsl:variable name="cnt" > select="count(preceding-sibling::$contextnode[@name='data'])"/> Try select="count($contextnode/preceding-sibling::*[@name='data'])"/> It may be necessary to add more restrictions, like select="count($contextnode/preceding-sibling::*[name()=name($contextnode) and @name='data'])"/> HTH J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to get the preceding-, Wendell Piez | Thread | [xsl] Re: xml and javascript, Jeni Tennison |
Re: [xsl] determining position of a, Jeni Tennison | Date | Re: [xsl] Brackets in XPATHS, Jeni Tennison |
Month |