[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

problem sorting uniquely w/transform()

Subject: problem sorting uniquely w/transform()
From: Shane Knapp <SKNAPP@xxxxxxxxxxxx>
Date: Wed, 6 Sep 2000 13:23:25 -0700
shane knapp
i am having a problem sorting uniquely on an element name...  i'm
translating the <LEAGUE NAME="..."> element to uppercase and seeing if it
matches any preceding elements.  

it works, however, if i *don't* do the translation.

so, here's a chunk of the xslt:

<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

<xsl:template match="/">
	<catalog>
		<xsl:for-each
select="//LEAGUE[not(translate(@NAME,$lower,$upper)=translate(preceding::*/@
NAME,$lower,$upper))]">
		<!-- <xsl:for-each
select="//LEAGUE[not(@NAME=preceding::*/@NAME)]">  for some reason, this
works-->

			<xsl:sort select="@NAME"/>
			<!-- do stuff -->
		</xsl:for-each>
	</catalog>
</xsl:template>

and here's what the data looks like:
<SCORES>
	<LEAGUE NAME="mlb">
	</LEAGUE>
</SCORES>

i'm using XT for processing (hence no keys).

thanks in advance!

shane
--
Shane Knapp
Wireless Platform Engineer
LiveMind, Inc
415.861.0394
www.livemind.com 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.