[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] problem sorting uniquely w/transform()
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
|
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
|