1
我在Windows XP上使用Apache FOP v.1.0(最新版),我想使用参数。我使用了不同的参数语法,但“fop”不使用它。在文档中写有:“-param name value”。我的XML文件的“-param”的Apache FOP用法
配件:
<letter position="1">
我在XSLT文件:
<xsl:param name="position"/>
<xsl:for-each select="letter[@position=$position]">
以下工作:
<xsl:for-each select="letter[@position=1]">
而这个作品也:
<xsl:param name="position" select="1"/>
<xsl:for-each select="letter[@position=$position]">
所以FOP只是没有得到任何输入。
命令我试过了,没有工作:
fop -param position 1 -xml data.xml -xsl stylesheet.xsl -pdf output.pdf
fop -xml data.xml -param position 1 -xsl stylesheet.xsl -pdf output.pdf
fop -xml data.xml -xsl stylesheet.xsl -param position 1 -pdf output.pdf
fop -xml data.xml -xsl stylesheet.xsl -pdf output.pdf -param position 1
fop -xml data.xml -xsl stylesheet.xsl -pdf output.pdf -param "position" 1
fop -xml data.xml -xsl stylesheet.xsl -pdf output.pdf -param position "1"
fop -xml data.xml -xsl stylesheet.xsl -pdf output.pdf -param "position" "1"
fop -xml data.xml -xsl stylesheet.xsl -param "position" 1 -pdf output.pdf
fop -xml data.xml -xsl stylesheet.xsl -param position "1" -pdf output.pdf
fop -xml data.xml -xsl stylesheet.xsl -param "position" "1" -pdf output.pdf
fop -xml data.xml -param "position" 1 -xsl stylesheet.xsl -pdf output.pdf
fop -xml data.xml -param position "1" -xsl stylesheet.xsl -pdf output.pdf
fop -xml data.xml -param "position" "1" -xsl stylesheet.xsl -pdf output.pdf
fop -param "position" 1 -xml data.xml -xsl stylesheet.xsl -pdf output.pdf
fop -param position "1" -xml data.xml -xsl stylesheet.xsl -pdf output.pdf
fop -param "position" "1" -xml data.xml -xsl stylesheet.xsl -pdf output.pdf
我看着Processing FOP with parameters,但他们不给工作的例子。
非常感谢,
我放置在参数在模板(的
user74952
2012-03-01 08:18:35
因此,现在我有: '<?xml version =“1.0”encoding =“utf-8”?>' '' '' '' '' –
user74952
2012-03-01 08:26:13
@ user74952 - 非常欢迎您! – 2012-03-01 08:38:24