font-size/font-family has no effect
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 fam开发者_开发技巧ily and size have no effect.
Does anyone know of anything I can check that might be over-riding the code?
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>
精彩评论