Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: get current position as parameter [Thread Next] Re: get current position as parameterTo: NULL Date: 9/11/2006 2:59:00 AM Thanks a lot Dimitre Novatchev ha scritto: > > <xsl:for-each select="../../ReturnList/Return" > > > xsl:sort="sum(../../OutwardList/Outward[$pos]/Price/Amount|../../ReturnList/Return[position()]/Price/Amount|$prezzo_gruppo)" > > order="ascending" data/type="number" /><br/> > > </xsl:for-each> > > > > but the sum is not right becouse the position value is not understanded > > from xpath... > > > Wich is the right way to get the "position()" value in this case > > without using a variable? > > > Use: > > count(current()/preceding-sibling::Return) + 1 > > > > Cheers, > Dimitre Novatchev > > > > > "Ghena" <lastminutesud@g...> wrote in message > news:1157837977.058656.169910@b...... > >I have this > > situation: > > > > <xsl:for-each select="../../ReturnList/Return" > > > xsl:sort="sum(../../OutwardList/Outward[$pos]/Price/Amount|../../ReturnList/Return[position()]/Price/Amount|$prezzo_gruppo)" > > order="ascending" data/type="number" /><br/> > > </xsl:for-each> > > > > but the sum is not right becouse the position value is not understanded > > from xpath... > > > > I check it by a comparing: > > > > <xsl:for-each select="../../ReturnList/Return" > > > <xsl:variable name="posrt" select="position()" /> > > <xsl:value-of > > select="sum(../../OutwardList/Outward[$pos]/Price/Amount|../../ReturnList/Return[$posrt]/Price/Amount|$prezzo_gruppo)" > > /><br/> > > > > <xsl:value-of > > select="sum(../../OutwardList/Outward[$pos]/Price/Amount|../../ReturnList/Return[position()]/Price/Amount|$prezzo_gruppo)" > > /><br/> > > > > </xsl:for-each> > > > > Wich is the right way to get the "position()" value in this case > > without using a variable? > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
