[Home] [By Thread] [By Date] [Recent Entries]
(expecting my first mail didn't reach the list, apologizing if this is the
second mail with the same question)
Hi all, I'm rendering pdf's with fop and I would like to keep all my lines/files of xsl to a minimum. This means I put a lot of formatting information in my xml file, something like this: <reportXML page-layout="portrait">
<title> Hello world </title>
<table table-layout="fixed">
<tr background-color="#CCCCCC">
<td width="10cm"
<block align="left">hello again</block>
</td>
</tr>
...Trying to keep xsl to a minimum also means it won't include hard-coded lines like: <fo:page-sequence master-reference="portrait"> My fo-statements (try to) use elements from the input xml, something like this: <fo:page-sequence master-reference="<xsl:value-of select="$page_layout"/>"> As expectd, his statement won't work. How to accomplisch this? ps what (technically) works, is: <xsl:if test="@page-layout='portrait'"> <fo:page-sequence master-reference="portrait"> <xsl:call-template name="continue"></xsl:call-template> </fo:page-sequence> </xsl:if> <xsl:if test="@page-layout='landscape'"> <fo:page-sequence master-reference="landscape"> <xsl:call-template name="continue"></xsl:call-template> </fo:page-sequence> </xsl:if> But this will overload my xsl file with if-statements (difficult to maintain) because I have to use this mechanism a lot. Thanks in advance, mathieu van echtelt _________________________________________________________________ Hotmail en Messenger on the move http://www.msn.nl/communicatie/smsdiensten/hotmailsmsv2/
|

Cart



