Hi Holger,

On Mon, Aug 09, 2004 at 02:35:05PM +0200, Holger Fl?rke wrote:
> Hi,
> 
> > xalan.exe -p "C:\Directory\SubDirectory" myxml.xml myxsl.xslt
> Did you forget to copy the name of the parameter to the mail?
> 
> I think this should be:
> xalan.exe -p myParameter "C:\Directory\SubDirectory" myxml.xml myxsl.xslt

Yeah, I meant exactly that... Sorry.

> Ok. And now for the real question ;^) The value for your stylesheet 
> parameter calling xalan.exe is an *expression* and *not a string*.
> 
> """
> Usage: Xalan [options] source stylesheet
> ...
>   -p name expression    Sets a stylesheet parameter.
> ...

Hmm... That's my mistake again it seems... :-) I've just checked the XSL
specification again, and it does say <xsl:param name="..." select="EXPRESSION">
in the docs... My only excuse is that MSXSL was happy to use it as a string.
:-(

> 
> This expression will be evaluated by Xalan at runtime. To pass a string you 
> have to surround it by quotes or apostrophs. The double-quotes are used to 
> surround one argument for passing values with spaces. Therefore you have to 
> write
> 
> xalan.exe -p myParameter "\"C:\Directory\SubDirectory\"" myxml.xml 
> myxsl.xslt
> 
> or
> 
> xalan.exe -p myParameter "'C:\Directory\SubDirectory'" myxml.xml myxsl.xslt
> 
> Maybe other processors accept only string values for stylesheet parameters. 
> They don't need the second pair of quotes, but you can't pass XPaths 
> evaluated at runtime or simple expressions like passing "1+2".

OK, thanks for clearing that up and for the quick reply.

Regards:
        Andras Babos.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to