Re: [xsl] position and loop problem

Subject: Re: [xsl] position and loop problem
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Thu, 14 Aug 2008 12:44:23 +0200 (CEST)
henry human wrote:

  Hi

> I save the number of a specific node as follow and get
> the right number for the node which is 2:
>        <xsl:variable name="var"
> select="count(document/elements/element[@type='section'])"/>
> However when I try it in a for-each loop as follow I
> get  6 times looping!
> Hier is the for-each loop:

> <xsl:for-each select="//*[position() &lt;= $var]">

  position() doesn't behave as you seem to think it does.  What you get
means there are in the input tree 6 elements that are the first or
second child of their parent element.

  What do you wanna do exactly?

  Regards,

--drkm























      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Current Thread