Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Strange Results

From: gadrin7@---.---
To: NULL
Date: 5/3/2005 10:09:00 PM
Using the following XML and XSL files works fine for the first FOR-EACH
in the XSL.

<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<Matches>
<Match>
	<Visitors Number="1" Games="3" Pins="3108" Wins="3" Losses="1"
G1="1067" G2="930" G3="1111" HighGame="1111">
		<Bowler Number="11" G1="192" G2="198" G3="202" TP="592" Strikes="19"
Spares="12" Opens="4"/>
		<Bowler Number="12" G1="238" G2="183" G3="244" TP="665" Strikes="20"
Spares="9" Opens="3"/>
		<Bowler Number="13" G1="194" G2="153" G3="205" TP="552" Strikes="18"
Spares="12" Opens="5"/>
		<Bowler Number="14" G1="201" G2="173" G3="257" TP="631" Strikes="24"
Spares="8" Opens="2"/>
		<Bowler Number="15" G1="242" G2="223" G3="203" TP="668" Strikes="23"
Spares="12" Opens="0"/>
	</Visitors>
	<Home Number="2" Games="3" Pins="3047" Wins="1" Losses="3" G1="985"
G2="996" G3="1066" HighGame="1066">
		<Bowler Number="21" G1="194" G2="184" G3="225" TP="603" Strikes="18"
Spares="12" Opens="4"/>
		<Bowler Number="22" G1="223" G2="224" G3="280" TP="727" Strikes="27"
Spares="6" Opens="2"/>
		<Bowler Number="23" G1="189" G2="163" G3="139" TP="491" Strikes="17"
Spares="9" Opens="7"/>
		<Bowler Number="24" G1="210" G2="185" G3="210" TP="605" Strikes="21"
Spares="15" Opens="1"/>
		<Bowler Number="25" G1="169" G2="240" G3="212" TP="621" Strikes="26"
Spares="9" Opens="2"/>
	</Home>
</Match>

</Matches>

<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;">
]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>

<xsl:template match="/*">
<!-- <xsl:for-each select="//Visitors/@G1 | //Visitors/@G2 |
//Visitors/@G3 | //Home/@G1 | //Home/@G2 | //Home/@G3"> -->
<xsl:for-each select="//Bowler/@G1 | //Bowler/@G2 | //Bowler/@G3">

<xsl:sort select="." order="descending"/>
		<font size="-2">
		<xsl:value-of select="position()"/> --
		<xsl:value-of select="name()"/> --
		<xsl:value-of select="."/>
		<br/>
		</font>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

But commenting out the 2nd FOR-EACH one and using the first doesn't
result in the list being sorted descending.

Any ideas ?



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent