MmM ...
MmM ...

Reputation: 131

How to style all the same XSL FO elements? XSL FO like CSS?

Is a way in XSL FO how to style all the same XSL FO elements in once? Source is in XML.

EXAMPLE:

<fo:table-row> {border-bottom: 1px solid #f0f0f0; }

INSTEAD OF:

<xsl:attribute-set name="border">
    <xsl:attribute name="border-bottom">1px solid #f0f0f0</xsl:attribute>
</xsl:attribute-set>

Its a big mess always using xsl:use-attribute-sets at all places with <fo:table-row>.

Upvotes: 1

Views: 497

Answers (1)

Kevin Brown
Kevin Brown

Reputation: 8877

Normally you are creating XSL FO from XML and XSL and that would not apply because you would do something in an template-match for whatever creates your table-row. So you would only be writing it once.

Now, you could use the same concept and create an identity XSL that modifies your XSL FO input to a new XSL FO and uses <xsl:template match="fo:table-row"> and applies all your rules.

Upvotes: 3

Related Questions