This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Detecting a break in data
- From: "Smith, Graham" <Graham dot Smith at pfizer dot com>
- To: "'XSL-List at lists dot mulberrytech dot com'" <XSL-List at lists dot mulberrytech dot com>
- Date: Wed, 19 Jun 2002 04:41:10 -0400
- Subject: [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 (for 'print', what I mean is displaying
through a browser - ultimately I take a hard-copy, but I haven't started
looking into XSL-FO yet...) My XML source has a list of nodes at a given
level - I am looping through them using a for-each construct, but have now
realised that if I use a variable to store the value of one of the fields,
the variable is a) no longer available in the next iteration of the for-each
loop, and b) is not updatable to hold the 'new' current compare value. I
suspect that I am approaching the problem from the wrong angle, given the
bias of too many tens of years coding for-next loops in various flavours,
and would welcome being steered in the right direction.
Many thanks,
Graham.
> Graham Smith (IPC 692)
> International Financial Systems
> Pfizer Limited
> Ramsgate Road
> Sandwich
> Kent
> England
> CT13 9NJ
>
> Tel: +44 1304 646054
> Fax: +44 1304 655711
> e-mail: Graham.Smith@Pfizer.com
>
>
> LEGAL NOTICE
>
> Unless expressly stated otherwise, this message is confidential and may be
> privileged. It is intended for the addressee(s) only. Access to this
> e-mail by anyone else is unauthorised. If you are not an addressee, any
> disclosure or copying of the contents of this e-mail or any action taken
> (or not taken) in reliance on it is unauthorised and may be unlawful. If
> you are not an addressee, please inform the sender immediately.
>
> Pfizer Limited is registered in England under No. 526209 with its
> registered office at Ramsgate Road, Sandwich, Kent CT13 9NJ
>
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list