Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
get the current position as parameter
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
get the current position as parameter
Author:
giancarlo rossi
Date:
10 Sep 2006 06:06 AM
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?
top
Subject:
get the current position as parameter
Author:
James Durning
Date:
11 Sep 2006 10:17 AM
Are you trying to get something like:
position() = current()/position()
I personally prefer the variable method however.
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
Powered by
Stylus Studio
, the world's leading
XML IDE
for
XML
,
XSLT
,
XQuery
,
XML Schema
,
DTD
,
XPath
,
WSDL
,
XHTML
,
SQL/XML
, and
XML Mapping
!
Go to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.