在docbook,to,pdf输出中强调了文本

时间:2010-06-11 00:07:48

标签: xml apache-fop docbook xslt

我试图强调一些静态文本的字符呈现在我的pdf的页脚中,但无法在我的xsl中找出正确的标签组合。我怎么能做到这一点?

示例:

<!-- Footer content -->
<xsl:template name="footer.content">  
  <xsl:param name="pageclass" select="''"/>
  <xsl:param name="sequence" select="''"/>
  <xsl:param name="position" select="''"/>
  <xsl:param name="gentext-key" select="''"/>

<fo:block>
<xsl:choose>

...
<xsl:when test="$sequence = 'odd' and $position = 'left'">
        <xsl:text>&#x00A9;<emphasis>My</emphasis>Company</xsl:text>
</xsl:when>
...
</xsl:choose>
</fo:block>
</xsl:template>

此示例在xsltproc中生成错误。救命啊!

1 个答案:

答案 0 :(得分:0)

尝试使用fo:inline

我不确定你想要达到什么样的重点或者你得到的是什么样的错误,但是尝试这样的事情:

<!-- Footer content -->
<xsl:template name="footer.content">  
  <xsl:param name="pageclass" select="''"/>
  <xsl:param name="sequence" select="''"/>
  <xsl:param name="position" select="''"/>
  <xsl:param name="gentext-key" select="''"/>

<fo:block>
<xsl:choose>

...
<xsl:when test="$sequence = 'odd' and $position = 'left'">
        <xsl:text>&#x00A9;</xsl:text><fo:inline text-decoration="underline">My</fo:inline><xsl:text>Company</xsl:text>
</xsl:when>
...
</xsl:choose>
</fo:block>

希望这有帮助。