在花了很多时间试图让我的文章用 Docbook 在 Ant 中编译之后,我似乎无法让 FO 编译工作。我正在使用 Xalan 2.7.0,其他所有内容(单页和分块 HTML)都可以完美编译。只有当我尝试编译为 FO 时才会收到此错误:
Fatal Error! org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of fop.extensions Cause: org.apache.xml.utils.WrappedRuntimeException: Could not find variable with the name of fop.extensions
这很奇怪,我似乎无法解决它。我什至添加了一个<param>
值来定义它“找不到”的变量:
<xslt style="docbook-xsl/fo/fo.xsl" in="documents/book.xml"
out="output.fo">
<classpath>
<fileset dir="lib" includes="**/*"/>
</classpath>
<param name="fop.extensions" expression="1"/>
</xslt>
我能做些什么来解决这个问题吗?如果你问我,这真的很奇怪。(同样,使用与上面相同的代码,我所有的其他 Docbook 编译工作都很好)