This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Detecting a break in data
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 20 Jun 2002 23:58:23 +0100
- Subject: RE: [xsl] Detecting a break in data
- Reply-to: xsl-list at lists dot mulberrytech dot com
> I am new to XML and XSL (but old to more conventional
> programming), and am having trouble trying to find a way to
> compare the value of a field in one record with the same
> field in the previous record (sorry - I suppose that should
> be node). Basically, I want to print all the records with a
> common category in one block, then print some kind of
> separator, followed by all the records of the next block
What you are describing is the problem known as "grouping". Look up
grouping in your favorite XSLT textbook, or at Jeni Tennison's site
www.jenitennison.com/xslt/grouping
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list