0

我试图强调一些静态文本的字符以呈现到我的 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 中生成错误。帮助!

4

1 回答 1

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>

希望这可以帮助。

于 2010-06-11T01:53:50.830 回答