That's exactly what I was looking for. Thanks Clay.
- steve
From: Clay Leeds <[EMAIL PROTECTED]>
Reply-To: fop-users@xmlgraphics.apache.org
To: fop-users@xmlgraphics.apache.org
Subject: Re: xsl-fo cascading styles?
Date: Wed, 25 Jan 2006 08:10:50 -0800
On Jan 25, 2006, at 7:43 AM, Steve Roy wrote:
Hello,
Is there a technique for re-using pre-defined styles in xsl-fo in a way
similar to using css styles in html? It seems redundant and labor
intensive to constantly redefine the same text style for fo:blocks and
fo:inline etc.
-steve
This is more an XSL question. I think what you want is <xsl:use-
attribute-set /> as follows:
1. build the attribute set:
<!-- BEGIN - attributes_DEFAULT attribute set (common for "-print/- awt"
and "-pdf" output) -->
<xsl:attribute-set name="attributes_DEFAULT">
<!-- background-color for overall EOR page - default:#ffffff (white)
-->
<xsl:attribute name="background-color">#ffffff</xsl:attribute>
<!-- color for text - default:#000000 (black)
-->
<xsl:attribute name="color">#000000</xsl:attribute>
<!-- font-family for text - default:"courier new, courier, monospace"
-->
<xsl:attribute name="font-family">courier new, courier, monospace</
xsl:attribute>
<!-- NOTE: Changes to font-family affects FOP rendering of EOR and may
require overhaul of template! -->
<!-- font-size for text - default:8pt - -->
<xsl:attribute name="font-size">8pt</xsl:attribute>
<!-- NOTE: Changes to font-size DRASTICALLY affects FOP rendering of
EOR and may require COMPLETE overhaul of template! -->
</xsl:attribute-set>
<!-- END - attributes_DEFAULT -->
2. Apple the use-attribute-set attribute:
<fo:page-sequence master-reference="repeating" force-page-
count="no-force">
<fo:static-content
flow-name="xsl-region-before">
<fo:block padding="0pt" xsl:use-attribute-
sets="attributes_DEFAULT">
<xsl:call-template
name="tmpHeader"/>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block
xsl:use-attribute-sets="attributes_DEFAULT">
<xsl:call-template
name="tmpFooter"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block
xsl:use-attribute-sets="attributes_DEFAULT">
<xsl:call-template
name="tmpBody"/>
<fo:block padding="0pt"
font-size="1pt">
<fo:marker
marker-class-name="table-continued"/>
</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
Web Maestro Clay
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]