This is an XSLT question, not really related to FOP.
http://xml.apache.org/fop/maillist.html#xslt-mulberry
You're violating XML structure like this (just like M$ does with WordML).
That's why you're getting the error. You can't program
spaghetti-code-style in XSLT the way you were trying. Everything is
highly hierarchical.
You should put the table-cell in a named xsl:template where you can pass
in the node to use for the address. Then maybe you can do something
along these lines, for example:
<xsl:for-each select="//client">
<xsl:if test="position() mod 3 = 0"> <!--only take every third node-->
<fo:table-row>
<xsl:call-template name="my-cell">
<xsl:with-param name="my-node" select="."/>
</xsl:call-template/>
<xsl:call-template name="my-cell">
<xsl:with-param name="my-node" select="following-sibling::client[1]"/>
</xsl:call-template/>
<xsl:call-template name="my-cell">
<xsl:with-param name="my-node" select="following-sibling::client[2]"/>
</xsl:call-template/>
</fo:table-row>
</xsl:if>
</xsl:for-each>
Untested and without guarantees!
Get a good XSLT book. I recommend "XSLT and XPath - On The Edge" by Jeni
Tennison.
On 24.09.2004 12:05:04 Frank Daly wrote:
> Hi
>
> I want to create an Avery labels report. The labels I use have 3
> columns so I want a new row for the first, fourth, seventh, etc. To
> this end I test the position and attempt to create a new row when
> position() modulus 3 = 1.
>
> <xsl:for-each select="//client">
> <xsl:if test="position() mod 3 =1">
> <!-- new row -->
> <fo:table-row>
> </xsl:if>
>
> I then put in the cell and my name and address.
>
> I then have a second test
> <xsl:if test="position() mod 3 =1">
> </fo:table-row>
> </xsl:if>
> </xsl:for-each>
>
> Unfortunately I get the error below
>
> The element type "fo:table-row" must be terminated by the matching
> end-tag "".
>
> Could someone point me in the right direction please.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]