XSLT y XSL-FO: ¿Crear una tabla con varias filas?
Soy bastante nuevo en XSLT y tengo un problema en el que tengo un Elemento con una cantidad desconocida de niños, y necesito mostrarlos en una tabla de modo que haya 5-6 columnas disponibles para mostrar la información.
Si me dan un archivo XML que se ve así:
<books>
<book>
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
</book>
<book>
<author>Corets, Eva</author>
<title>Maeve Ascendant</title>
</book>
<book>
<author>Corets, Eva</author>
<title>Oberon's Legacy</title>
</book>
<book>
<author>Randall, Cynthia</author>
<title>Lover Birds</title>
</book>
<book>
<author>Thurman, Paula</author>
<title>Splish Splash</title>
</book>
<book>
<author>Knorr, Stefan</author>
<title>Creepy Crawlies</title>
</book>
<book>
<author>Kress, Peter</author>
<title>Paradox Lost</title>
</book>
<book>
<author>Crichton, Michael</author>
<title>Jurassic Park</title>
</book>
<book>
<author>Orwell, George</author>
<title>1984</title>
</book>
<book>
<author>Martin, George</author>
<title>A Song of Ice And Fire</title>
</book>
</books>
Me gustaría mostrar estos 10 libros en una tabla que consta de dos filas y cinco columnas.
He llegado hasta aquí:
<xsl:template match="books" mode="table">
<fo:table margin-left="auto" margin-right="auto">
<fo:table-body>
<fo:table-row table-layout="fixed">
<xsl:for-each select="skill">
<fo:table-cell border="1">
<fo:block font-weight="bold">
<xsl:value-of select="name"/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
Pero todo lo que hará es poner cada celda en la misma fila. Estoy buscando una manera de verificar si el ciclo se ha ejecutado una cierta cantidad de veces (5 o 6), e insertando una nueva fila cuando eso sucede, pero no sé si eso es algo que puedo hacer en XSL.
¿Alguien puede señalarme en la dirección correcta?