W3C home > Mailing lists > Public > www-xsl-fo@w3.org > December 2003

xsl: for-each break

From: Marek Hubatka <hubatka@virtual7.de>
Date: Thu, 18 Dec 2003 19:52:26 +0100
Message-ID: <2C889D2B76F83D43A0E1EA74444E8D5F170878@dominator.virtual7.local>
To: <www-xsl-fo@w3.org>

Hi.

I have a problem... I need to make a break or something in a xsl: for-each. It has to act like a "while" command in other languages. so it must do a for-each until a condition is not valid any more.

The sense of this is, that i got a xml file with some "group" nodes in it. one or more group node is in another. i do a xsl:for-each select="descendant::group". in this for-each it looks for a node "record" in the deepest group-node. when it finds a record, it does something and will make a for.each select="ancestor::group" to get the parents. for each parent it tests, if it is the last group of the parent ( xsl:if test = ". = ../group[last()]" ). when it find one group, which is NOT last(), it has to cancel and not process the parents of this node.

Any ideas?

THX
MiB
Received on Friday, 19 December 2003 03:22:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:11 GMT