Subject: RE: [xsl] [xsl fo] xsl to a minimum / statements 'on the fly' From: "ongeaddresseerd ongeaddresseerd" <ongeadresseerd@xxxxxxxxxxx> Date: Fri, 14 May 2004 15:09:48 +0000 |
You can achieve what you want with attribute value templates
<elem attr="{expr}">
but it seems to me like a peculiar design. It seems to miss the whole point of what stylesheets are for.
I still have to see if this works out. --
Michael Kay
> -----Original Message----- > From: ongeaddresseerd ongeaddresseerd > [mailto:ongeadresseerd@xxxxxxxxxxx] > Sent: 14 May 2004 12:48 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] [xsl fo] xsl to a minimum / statements 'on the fly' > > (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/
_________________________________________________________________ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] [xsl fo] xsl to a minimum, Michael Kay | Thread | RE: [xsl] [xsl fo] xsl to a minimum, Andreas L. Delmelle |
RE: [xsl] how to figure out what le, Passin, Tom | Date | RE: [xsl] [xsl fo] xsl to a minimum, Andreas L. Delmelle |
Month |