尝试:
<xsl:template match="table"> <fo:block-container width="{@width}"> <fo:table> <xsl:apply-templates select="@*|node()"/> </fo:table> </fo:block-container> </xsl:template>
这假设您还有其他模板来处理表的节点-在此处查看示例:https://xsltfiddle.liberty-development.net/ncntCSh/1