Re: Table style templates

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 UTC