W3C home > Mailing lists > Public > www-xsl-fo@w3.org > March 2001

Re: for-each question

From: David Carlisle <davidc@nag.co.uk>
Date: Thu, 15 Mar 2001 13:52:23 GMT
Message-Id: <200103151352.NAA25497@penguin.nag.co.uk>
To: kevin@fusebox.com
CC: www-xsl-fo@w3.org


Are you trying to generate HTML? If so why ask on the XSL FO list?

If you are trying to typeset an HTML document by converting it to FO
then that is of course the subject of this list, but in that case I
didn't understand the question.

I think you are trying to generate HTML, in which case you are on the
wrong list, you want to go over to 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


but basically you want something like

<xsl:for-each select="managers[position() mod 3 = 1]">
 <tr>
 <xsl:for-each select=".|following-sibling::manager[position()
 &lt; 3]">
  <td><xsl:apply-templates/></td>
 </xsl:for-each>
 </tr>
</xsl:for-each>

ie select every third manager, make a row, within that select the
current manager and its two following siblings and make a cell out of
each of those.

David
(don't follow up on this list, as I say above xsl-list is the list for
this kind of question)

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
Received on Thursday, 15 March 2001 08:55:47 GMT

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