[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Selecting case insensitively
Hi, I tried to get "insensitively" unique records from a list and I failed, what am I missing? Based on the FAQ http://www.dpawson.freeserve.co.uk/xsl/N2696.html#N8679 and Jeni's http://sources.redhat.com/ml/xsl-list/2000-08/msg00787.html I wrote the following: ********* xml file **************** <location> <state>xxxx</state> </location> <location> <state>yyyy</state> </location> <location> <state>xxxx</state> </location> <location> <state>xxXx</state> </location> ********* end xml file *********** ********* xsl file **************** <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" /> <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" /> <xsl:template match="/"> <xsl:variable name="unique-list" select="Test/location/state[not(translate(.,$lowercase,$uppercase)=translate(following::state,$lowercase,$uppercase))]" /> <xsl:for-each select="$unique-list"> <xsl:value-of select="." /><BR/> </xsl:for-each> </xsl:template> ********* end xsl file *********** ********* result file *********** xxxx<BR />yyyy<BR />xxXx<BR /> ********* end result file ******* I expected to get xxxx<BR />yyyy<BR /> as a result. Thank you for your time and any help you provide. Best, Michal 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
|