Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xpath 如何匹配<;sup>;价值</sup>;在XSL-FO中_Xpath_Xsl Fo - Fatal编程技术网

Xpath 如何匹配<;sup>;价值</sup>;在XSL-FO中

Xpath 如何匹配<;sup>;价值</sup>;在XSL-FO中,xpath,xsl-fo,Xpath,Xsl Fo,我正在使用xsl fo并尝试在 我想做上标2 2 我使用下面的代码,我认为应该可以工作 <xsl:template match="sup[@id='*']"> <fo:inline font-size="24pt" font-weight="bold" text-indent="2em" text-transform="uppercase" > <xsl:apply-templates/>

我正在使用xsl fo并尝试在

我想做上标2

2

我使用下面的代码,我认为应该可以工作

 <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:template>

但我所采用的所有风格都没有被认可。我开始认为这是因为2在外部参照中,xsl fo会忽略它

有谁能给我一些建议,告诉我如何迎合这些口味


谢谢,

此模板不匹配您的
元素的原因是您正在将
与值为
*
id
属性匹配

如果您试图匹配具有
id
属性的
元素,请将匹配更改为:

sup[@id]
另外,尝试对上标文本使用
vertical align=“super”

例如:

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

此模板与
元素不匹配的原因是您将
与具有值
*
id
属性相匹配

如果您试图匹配具有
id
属性的
元素,请将匹配更改为:

sup[@id]
另外,尝试对上标文本使用
vertical align=“super”

例如:

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