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

RE: XSL Newbie seeks help

Subject: RE: XSL Newbie seeks help
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 8 Feb 2005 13:30:53 -0000
RE:  XSL Newbie seeks help
Your problem is known as "grouping" and there is a vast literature on the
subject.

XSLT 2.0 has an instruction xsl:for-each-group to handle the problem, and
the techniques you can use in XSLT 1.0 are explained at
http://www.jenitennison.com/xslt/grouping

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: mylistaddress@xxxxxxxxxx [mailto:mylistaddress@xxxxxxxxxx] 
> Sent: 08 February 2005 13:15
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  XSL Newbie seeks help
> 
> HI,
> I searched the archives and must admit I am not sure if
> I found what I needed, as a lot of what I see is all
> new to me.
> 
> I am successfully applying a very basic XSL sheet to an
> XML document using <xsl:template match="Field"> against
> an XML document which has multiple "Field" nodes but
> with different names, like this:
> 
> <Field FieldName="DOCID">abc1223</Field>
> <Field FieldName="COUNTRY">USA</Field>
> <Field FieldName="COUNTRY">Canada</Field>
> 
> This works great, but as you may have noticed, some
> fields have the same FieldName attribute, and sometimes
> there can be a dozen countries, and this make my
> transformed document (HTML table) much longer as it
> creates a row for each COUNTRY entry.
> 
> How would I evaluate that there is more than one
> occurance of the Field/FieldName combination so that I
> can create a concatenated list of contries so as to
> display them all on only one row?
> 
> Any help appreciated.
> 
> Jim

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.