One option that is fairly close to what you want is to use an xsl:attribute-set
Example:
<xsl:attribute-set name="headline">
<xsl:attribute name="font-weight" select="'bold'"/>
<xsl:attribute name="margin-bottom" select="'1cm'"/>
<xsl:attribute name="color" select="'#424242'"/>
</xsl:attribute-set>
<xsl:template match="foo">
<fo:block xsl:use-attribute-sets="headline">...</fo:block>
</xsl:template>
Note: If you're using XSLT 1.0, you can't use select
in xsl:attribute
.