在花了很多时间尝试用Docbook在Ant中编译我的文章之后,我似乎不能使FO编译工作。我使用的是Xalan 2.7.0,其他所有东西(包括单页HTML和分块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编译工作都很好)
发布于 2010-05-08 15:36:00
尝试使用fo/docbook.xsl而不是fo/fo.xsl。这是XSL-FO输出的主样式表。
https://stackoverflow.com/questions/2791221
复制相似问题