Subject: RE: [xsl] Detecting a break in data From: TSchutzerWeissmann@xxxxxxxxxxxxxxxx Date: Wed, 19 Jun 2002 10:05:22 +0100 |
Hello Graham, > 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). So you want to compare only pairs, in that the comparison is between one record and its immediate neighbour only? > 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 Here it sounds more like you want to group records by category, where any record in the same category as any other gets lumped together, neighbours or not. ...> 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 XSLT is a functional rather than a procedural language, so it doesn't have for-next loops. If you really need them for some reason, eg doing something six times, you can use recursive templates, but if you want group records / nodes according to a category, that's an FAQ, assuming I've understood your intentions. Do you have some sample input and output? Cheers, Tom XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Detecting a break in data, Michael Kay | Thread | RE: [xsl] Detecting a break in data, Smith, Graham |
Re: AW: [xsl] Writing a stylesheet , David Carlisle | Date | [xsl] Calling extension fuction err, Cao Tuan Dung |
Month |