W3C home > Mailing lists > Public > www-xsl-fo@w3.org > November 2008

Re: Table style templates

From: Jeremias Maerki <dev@jeremias-maerki.ch>
Date: Fri, 14 Nov 2008 08:05:08 +0100
To: www-xsl-fo@w3.org
Message-Id: <20081114075941.B6D4.60BA733C@jeremias-maerki.ch>

In addition to that, the xsl:attribute-set and xsl:use-attribute-sets
pair (both XSLT features) served me well in the past. I often create a
separate "styles" stylesheet with only attribute sets which I then
import in the other stylesheets to separate large parts of the FO
styling from the actual transformation logic.

On 13.11.2008 10:49:14 David Carlisle wrote:
> 
> 
> The model for XSL FO is that (more or less) everything is expanded out
> in the FO file, but the program that you use to create that file
> (usually XSLT) can of course use the features of that language to
> organise the generation.
> 
> here for example it looks like you could use a named template, something
> like 
> 
> <xsl:template name="cell">
>   <xsl:param name="body"/>
>       <fo:table-cell padding-before="1pt" padding-after="1pt"
> padding-start="2pt" padding-end="2pt"
>         border-style="solid">
>       <fo:block><xsl:value-of select="$body/></fo:block>
>     </fo:table-cell>
> </xsl:template>
> 
> Then
> 
> <xsl:call-template>
>   <xsl:param name="body" select="format"/>
> </xsl:call-template>
> <xsl:call-template>
>   <xsl:param name="body" select="sector"/>
> </xsl:call-template>
> 
> David



HTH,
Jeremias Märki
_________________________________________________________
Jeremias Märki, Software-Development and Consulting
Contact Information: http://www.jeremias-maerki.ch/contact.html
Blog: http://www.jeremias-maerki.ch/blog/
Received on Friday, 14 November 2008 07:05:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 14 November 2008 07:05:37 GMT