[xsl] table creation from xml

Subject: [xsl] table creation from xml
From: Andreas Peter <info@xxxxxxxxxx>
Date: Mon, 11 Jun 2007 14:58:47 +0200
Hello xsl-list,

I want to create a table with 3 columns and x rows. The contents of
the table should be read from a xml file which looks like the
following example:

 <referent>Vortrag mit Ekhard Woelbert</referent>
 <datum>Mi. 10.01.07</datum>
 <uhrzeit>19.30 - 21.00 Uhr</uhrzeit>
 <kursnr>Kurs-Nr: 1</kursnr>
 <beitrag>4,00 &#8364;</beitrag>

<referent> should be spanned by 3 columns (managed :-). <datum>
(should be always in first column), <uhrzeit> (should be always in
second), <kursnr> AND <beitrag> always in third column among each
other. This structure should be flexible so if elements of <datum>,
<uhrzeit>, <kursnr>, <beitrag> will be added, the table should grow.
IB4ve written a xsl file, but it does not really work so far:

<xsl:template match="kursinfo">
<fo:block xsl:use-attribute-sets="kursinfo">
<fo:table width="{$table.width}" height="{$table.height}"

<xsl:for-each select="referent">
<fo:table-cell number-columns-spanned="2" column-number="1">
<fo:block text-align="left">

<fo:inline font-weight="bold">
<xsl:value-of select="."/>

<xsl:for-each select="test">
<fo:table-cell column-number="1" width="20mm">
<fo:block text-align="left"><xsl:value-of select="datum"/></fo:block>
<fo:table-cell column-number="2" width="30mm">
<fo:block text-align="left"><xsl:value-of select="uhrzeit"/></fo:block>
<fo:table-cell column-number="3" width="20mm">
<fo:block text-align="left"><xsl:value-of select="kursnr"/></fo:block>
<fo:block text-align="left"><xsl:value-of select="beitrag"/></fo:block>

I would be very thankful for any hint which will solve my "problem".

Thanks a lot,

Current Thread