我有一个XSL文件,可以转换为PDF。在此页面的顶部,我有一个很长的CSS样式,例如
<xsl:attribute-set name="Header">
<xsl:attribute name="font-size">
<xsl:value-of select="$font-size"/>
</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
</xsl:attribute-set>
...
Run Code Online (Sandbox Code Playgroud)
渲染需要很长时间,因此我将它们复制到另一个位置的新页面(PDF_style.xsl)中。然后我用
<xsl:include href="../allStyles/PDF_style.xsl"/>
Run Code Online (Sandbox Code Playgroud)
但是当我测试它时,系统说它无法归档该文件位置!
注意:allStyles是我存储每个样式表文件的文件夹,并且路径是正确的路径。
是<xsl:include href="..." />链接外部文件的正确方法吗?还是我必须使用其他东西?