|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Last () -1
The result I am looking for is varL52 set to 6200 G'day, I am not quite getting the results I expected and I suspect it is because I am misreading how position and last works. I want to have a variable that selects nodes, sorts the nodes and selects the last. If I assume that the nodes are "numbered" starting from the last as 16, 15, 14, 13 ,12 and I say 'day[position() > last()-5 and position() < last()-1]' then am I selecting 14, 13 12.?? Maybe there is a better way Any thoughts Salud John <xsl:variable name="varL52"> <xsl:for-each select="day[position() > last()-3 and position() < last()-1]"> <xsl:sort select="cl" order="descending" data-type="number"/> <xsl:if test="position()=last()"><xsl:value-of select="cl" /></xsl:if> </xsl:for-each> </xsl:variable> <asx id="AAI" coy="ALCOA INC." sector="Materials" asxNo="None" currHi="6600" currCl="6600" currVol="0" currDate="20031002"> <day id="20030804" weekno="1"> <op>6600</op> <hi>6600</hi> <lo>6600</lo> <cl>6500</cl> <vol>0</vol> </day> <day id="20030805" weekno="1"> <op>6600</op> <hi>6600</hi> <lo>6600</lo> <cl>6600</cl> <vol>0</vol> </day> <day id="20030806" weekno="1"> <op>6600</op> <hi>6600</hi> <lo>6600</lo> <cl>6200</cl> <vol>0</vol> </day> <day id="20030807" weekno="1"> <op>6600</op> <hi>6600</hi> <lo>6600</lo> <cl>6700</cl> <vol>0</vol> </day> </asx> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








