Hi Christophe,
I don't seem to be able to reproduce your problem with Xalan-J 2.4.1
or the latest code from CVS. For example:
$ java org.apache.xalan.xslt.Process -IN blah.xml
-XSL param.xsl
-PARAM param1 toto
-PARAM param2 titi
produces the following output for me:
<?xml version="1.0" encoding="UTF-8"?>
<param1>toto</param1><param2>titi</param2>
I don't have a copy of Xalan-J 2.4.0 handy, so I'm not sure whether
this is a problem that was fixed since that release.
Thanks,
Henry
------------------------------------------------------------------
Henry Zongaro Xalan development
IBM SWS Toronto Lab Tie Line 969-6044; Phone (905) 413-6044
mailto:[EMAIL PROTECTED]
Christophe Galerne <[EMAIL PROTECTED]>
01/21/2003 06:22 PM
To: [EMAIL PROTECTED]
cc:
Subject: Only one -PARAM allowed on the commandline?
Hi,
Given this stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="param1"/>
<xsl:param name="param2"/>
<xsl:template match="/">
<param1><xsl:value-of select="$param1"/></param1>
<param2><xsl:value-of select="$param2"/></param2>
</xsl:template>
</xsl:stylesheet>
This invocation of xalan:
java
-Djava.endorsed.dirs="d:\xalan-j_2_4_0\bin"
org.apache.xalan.xslt.Process
-IN xml/whatever.xml
-XSL xsl/param.xsl
-PARAM param1 toto
-PARAM param2 titi
produces this result:
<?xml version="1.0" encoding="UTF-8"?>
<param1>toto</param1><param2/>
and this invocation:
java
-Djava.endorsed.dirs="d:\xalan-j_2_4_0\bin"
org.apache.xalan.xslt.Process
-IN xml/whatever.xml
-XSL xsl/param.xsl
-PARAM param2 titi
this result:
<?xml version="1.0" encoding="UTF-8"?>
<param1/><param2>titi</param2>
So it looks like only one parameter is allowed on the command line.
However the documnentation in 'commandline.html' states:
'
To set stylesheet parameters from the command line, use
java org.apache.xalan.xslt.Process -PARAM name value
'
This is really a detail but maybe the doc should not imply that
multiple parameters can be specify.
Thanks,
Christophe