[prev in list] [next in list] [prev in thread] [next in thread]
List: fop-user
Subject: Re: Problems with tables and templates
From: Chris Pratt <chrisp () planetpratt ! com>
Date: 2004-08-27 6:42:32
Message-ID: 0l134zcwp2lyt2u.260820042342 () mail ! planetpratt ! com
[Download RAW message or body]
Yup, you're wrong =8^). As long as the begin and end are in the same template, it's \
valid. In other words, you can't have the <td> tag in one template and the matching \
</td> in another, but you can have the <table> and </table> around an \
<xsl:apply-templates> that puts in the rows. The same is true for fo. (*Chris*)
Original Message -----------------------
Hi,
the problem is that you can't create some elements of a table without ending it.
In html you can begin a table and in the next template you can add rows and cells and \
in another template you can close the table, that's not possible in pdf. Or am i on \
the wrong way?
In the meantime i changed my xsl script completely, so it works in a completely other \
way. It's rather a problem of xsl.
Thanks
Sven
Chris Pratt wrote:
> How about something like this:
>
> <xsl:template match="theme">
> <table border="0">
> <tr>
> <td colspan="3"><xsl:value-of select="name"/></td>
> </tr>
> <xsl:apply-templates select="test"/>
> </table>
> </xsl:template>
>
> <xsl:template match="test">
> <tr>
> <td><xsl:apply-templates select="name"/></td>
> <td><xsl:apply-templates select="status"/></td>
> <td><xsl:apply-templates select="prio"/></td>
> </tr>
> </xsl:template>
>
> That's obviously an HTML example, but it should be easy to change to FO table \
> layout if you need. (*Chris*)
>
>
> Original Message -----------------------
> Hi,
>
> i have a table with 3 columns.
>
> Example:
>
> Table: Test Status Priority
> Theme1
> Test1 ok 1
> Test2 fail 1
>
> Theme2
> Test1 ok 3
> Test2 ok 2
>
>
> The xml file:
> <root>
> <theme>
> <name></name>
> <test>
> <name></name>
> <status></status>
> <prio></prio>
> </test>
> </theme>
> </root>
>
>
>
> Now my problem is the following:
>
> How can i achieve that the table will be filled up correctly?
>
> In my xsl-fo file i have a template that matches "theme" and calls template \
> matching "test".
> So looks the table after filling it up with my solution:
>
>
>
> Table: Test Status Priority
>
> Test1
> ok 1
> Test2
> fail 1
>
>
> Test1
> ok 3
> Test2
> ok 2
>
>
> Thanks in advance
>
> Sven
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic