Thanks!

I'm using Linux and I ended up solving my problem by escaping the
quotes:

./Xalan -p id \"foo\" test.xml test.xsl

this also worked: ./Xalan -p id \'foo\' test.xml test.xsl

-Chris


David N Bertoni/Cambridge/IBM wrote:
> 
> This could be an issue with your operating system command processor,
> although I don't have Xalan 1.2 around with which to test this, so it could
> be a bug with the parameters mechanism (although I doubt it).
> 
> Here's what I get with the latest CVS code, on Windows 2000, using your
> stylesheet and a dummy input document:
> 
>    C:\test\Saint-Amant>Xalan -p id "'foo'" test1.xml test1.xsl
> 
>                                     ID: foo
>    C:\test\Saint-Amant>
> 
> How you specify the value depends on your command line processor and how it
> handles the " and ' characters.
> 
> Dave
> 
> 
>                       Chris
>                       Saint-Amant              To:      
> [email protected]
>                       <[EMAIL PROTECTED]         cc:      (bcc: David N 
> Bertoni/Cambridge/IBM)
>                       net>                     Subject: Params at command line
> 
>                       04/02/2002 07:02
>                       PM
>                       Please respond
>                       to chris
> 
> 
> 
> Hi,
> 
> I'm having a problem passing parameters to a stylesheet using the Xalan
> command line app.
> 
> When I call: ./Xalan -p id foo portfolio.xml test.xsl
> ...the param "id" never gets passed to the stylesheet.  I've also tried
> things like -p id 'foo' or -p id "foo" but nothing seems to work.
> 
> I've been testing using the following XSL:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> version="1.0">
> 
>              <xsl:output method="html" indent="yes"/>
> 
>              <xsl:param name="id">default</xsl:param>
> 
>              <xsl:template match="/">
>                          ID: <xsl:value-of select="$id" />
>              </xsl:template>
> 
> </xsl:stylesheet>
> 
> When I don't pass any parameter to the command line, it echoes "ID:
> default", but when I _do_ pass the parameter, it just echoes "ID: ".
> Anyone else experience this?  I am using Xalan build 1.2.
> 
> -Chris Saint-Amant <[EMAIL PROTECTED]>

Reply via email to