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

Ignore case while grouping

Subject: Ignore case while grouping
From: "Manish_Jaiswal" <Manish_Jaiswal@xxxxxxxxxx>
Date: Fri, 8 Feb 2008 12:59:22 +0530
 Ignore case while grouping
Hi All,

Just to add one more issue in my previous problem. Is it possible to
ignore case while grouping using for-each-group.

For example by using below XSLT-
<xsl:for-each-group select=" School/student group-by="name/tokenize(.,
<xsl:sort data-type="number" select="count(current-group())"
order="descending" />
<xsl:sort select="current-grouping-key()"/>
<xsl:if test="position()<=3">
<name count="{count(current-group())}">
<xsl:value-of select="current-grouping-key()"/>

Where input xml is-
input XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<student rec='1'>
<name>Robart J</name>
<student rec='2'>
<name>Robart J</name>
<student rec='3'>
<name> ROBART J </name>
<student rec='4'>
<name>ROBART J</name>

The output I m getting is :
<name count='2'>Robart J</name>
<name count='2'>ROBART J</name>

Please have a look into the  value of nodes <name>.It is very clear
value of both name nodes are same but different in case(one is Robart J
and other is ROBART J) .

But I want the output to come like this-
<name count='4'>Robart J</name>

Is there any way to ignore case while grouping the nodes?

Thanks in advance.


This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE
COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the
sender by email and delete all copies; your cooperation in this regard is

Current Thread


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.
First Name
Last Name
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.