On Tue, Feb 10, 2009 at 3:49 AM, dodo_ind <anoopchandran.othay...@wipro.com>wrote:
> > Hi > When I try to set a parameter using "-p" option, xalan gives following > error: > > [r...@test1 bin]# ./Xalan -p version "1.1.1.1" /home/SAMPLE.xml > /home/test.xsl > XPathParserException: Extra illegal token. > expression = '1.1.1.1' Remaining tokens are: ( '.1.1') (, line -1, column > -1) Because the parameter is being parsed as an expression, not as a string. > > > I get error only when I try to set expression that contains more than 1 > dot. > I don't get error for the following command: > > [r...@test1 bin]# ./Xalan -p version "1.1" /home/SAMPLE.xml > /home/test.xsl > XPathParserException: Extra illegal token. > expression = '1.1.1.1' Remaining tokens are: ( '.1.1') (, line -1, column > -1) > > Is this a data type issue? I don't face any problem when I use OXYGEN > editor. It sets the parameter without any problem. If you want to pass a string, you need to enclose the parameter in quotes. Other processors may assume that all parameters are strings, but Xalan-C does not. > > > Any solution for this? > I use xalan version 1.10.0 and xerces version is 2.8.0 on FEDORA machine. If you are using the bash shell: ./Xalan -p version " '1.1.1.1' " /home/SAMPLE.xml /home/test.xsl That is, the string '1.1.1.1' surrounded by double quotes. I've put a space between the " and the ' characters for legibility. Dave