Processing FOP with parameters

旧时模样 提交于 2019-12-07 22:43:09

问题


HI, I want to use FOP to prepare a XML document for printing (ps/pdf). Is it possible to send parameters to FOP to do conditional formating as exist in xsl processors

XSL:

<xsl:param name="isDuplicate">no</xsl:param>
....
<xsl:if test="$isDuplicate='yes'">
    <h2 align="center">Copy</h2>
</xsl:if>
....

回答1:


If you're using the fop batch/shell file that comes with the distribution, you can use the --param argument to fop, as documented on the Fop page

  -param name value <value> to use for parameter <name> in xslt stylesheet
                    (repeat '-param name value' for each parameter)


来源:https://stackoverflow.com/questions/1250855/processing-fop-with-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!