Detecting a break in data
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@xxxxxxxxxx > > > 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
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