开发者

How to match <sup>value</sup> in XSL-FO

I'm using xsl-fo and trying to style xref content within a <sup>

eg I want to make the 2 superscript.

<sup id="FNB-0002"><xref href="#Comp_CLJONLINE_CLJ_2010_04_2/FN-0002">2</xref></sup>

I am using the following code which I think should work.

 <xsl:template match="sup[@id='*']">    
        <fo:inline font-size="24pt" font-weight="bold" text-indent="2em" text-transform="uppercase" >
            <xsl:apply-templates/>
            </fo:inline>
    </xsl:temp开发者_如何学Pythonlate>

But none of the styles I am applying are being recognised. I'm beginning to think that this is because the 2 is within an xref and the xsl-fo is then ignoring it.

Could anyone give me some pointers as how to cater for and style these sups

Thanks,


The reason this template is not matching your <sup> element is because you are matching a <sup> with an id attribute that has the value *.

If you are trying to match <sup> elements that have an id attribute, change your match to this:

sup[@id]

Also, try using vertical-align="super" for superscript text.

Example:

<fo:inline vertical-align="super" font-size="8pt">
    <xsl:apply-templates/>
</fo:inline>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜