views:

95

answers:

1

This is a related issue to my previous question.

I have modified the code suggested for preface headings to modify the p tags underneath the headings.

<xsl:template match="topic[title='Preface']/body/section/p">
        <fo:block xsl:use-attribute-sets="preface.p">
            <xsl:apply-imports/>
        </fo:block>
    </xsl:template>

<xsl:attribute-set name="preface.p">
        <xsl:attribute name="font-family">Helvetica</xsl:attribute>
        <xsl:attribute name="color">red</xsl:attribute>
        <xsl:attribute name="font-size">8pt</xsl:attribute>
    </xsl:attribute-set>

The color changes the desired text - and only the desired text, so I know it is grabbing the correct nodes. However, the font family and size have no effect.

Does anyone know of anything I can check that might be over-riding the code?

A: 

HTML doesn't have the attributes font-family or font-size, they are CSS properties, try this:

<xsl:attribute-set name="preface.p">
    <xsl:attribute name="style">font-family: Helvetica; color: red; font-size: 8pt;</xsl:attribute>
</xsl:attribute-set>
svick
the template match code resides in my dita2fo shell file and the attribute-set is in a dita2fo-parms file. This is all XSL FO at this point - correct?If I were to run the "name='style'" attribute as you suggest I would receive: Invalid property name 'style'. Property ignored.
kman
Ah, I don't know XSL FO, I assumed you used the code to generate HTML.
svick