You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by David Delgranche <dd...@silicom.fr> on 2000/12/20 16:09:57 UTC
Using -PARAM in command line
Hi,
I'm trying to pass parameters to a stylesheet using Xalan. So I have
used the following syntax:
xalan -IN input.xml -XSL stylesheet.xsl -OUT result.xml -PARAM name
value
In my stylesheet I try to fetch the parameter using a xsl:value-of
select="$name"/> but the parameter is unknown. Can someone explain me
how to fetch this parameter in my stylesheet?
Thanks a lot
David.
--
David DELGRANCHE - ddelgranche@silicom.fr
Silicom Région Ouest
80 avenue des Buttes de Coesmes 35700 RENNES (FRANCE)
Tel: 02 99 84 17 17
Re: Using -PARAM in command line
Posted by Gary L Peskin <ga...@firstech.com>.
David Delgranche wrote:
> I've tried defining the param in the stylesheet. It doesn't work, have
> you more information to give me?
> ...
> > >xalan -IN input.xml -XSL stylesheet.xsl -OUT result.xml -PARAM name
> > >value
It would be helpful if you showed the actual command line. The
parameter value is an XPath. If you want to pass a string, enclosed it
in apostrophes like this:
xalan -IN input.xml -XSL stylesheet.xsl -OUT result.xml -PARAM
paramname "'value'"
HTH,
Gary
Re: Using -PARAM in command line
Posted by David Delgranche <dd...@silicom.fr>.
Fergus Gallagher a écrit :
>
> The parameter must be defined in the stylesheet - it will be overridden by
> the externally defined one, e.g.,
>
> <xsl:param name="name" select="'##UNDEFINED##'"/>
>
I've tried defining the param in the stylesheet. It doesn't work, have
you more information to give me?
> The same is true for templates called with <xsl:with-param>, though xalan
> 1.2 (at least) doesn't enforce this requirement of the specs.
>
> Fergus
>
> At 16:09 20/12/00 +0100, David Delgranche wrote:
> >Hi,
> >
> >I'm trying to pass parameters to a stylesheet using Xalan. So I have
> >used the following syntax:
> >xalan -IN input.xml -XSL stylesheet.xsl -OUT result.xml -PARAM name
> >value
> >In my stylesheet I try to fetch the parameter using a xsl:value-of
> >select="$name"/> but the parameter is unknown. Can someone explain me
> >how to fetch this parameter in my stylesheet?
> >Thanks a lot
> >David.
> >--
> >David DELGRANCHE - ddelgranche@silicom.fr
> >Silicom Rgion Ouest
> >80 avenue des Buttes de Coesmes 35700 RENNES (FRANCE)
> >Tel: 02 99 84 17 17
--
David DELGRANCHE - ddelgranche@silicom.fr
Silicom Région Ouest
80 avenue des Buttes de Coesmes 35700 RENNES
Tel: 02 99 84 17 17
Fax: 02 99
Re: Using -PARAM in command line
Posted by Fergus Gallagher <Fe...@OrbisUK.com>.
The parameter must be defined in the stylesheet - it will be overridden by
the externally defined one, e.g.,
<xsl:param name="name" select="'##UNDEFINED##'"/>
The same is true for templates called with <xsl:with-param>, though xalan
1.2 (at least) doesn't enforce this requirement of the specs.
Fergus
At 16:09 20/12/00 +0100, David Delgranche wrote:
>Hi,
>
>I'm trying to pass parameters to a stylesheet using Xalan. So I have
>used the following syntax:
>xalan -IN input.xml -XSL stylesheet.xsl -OUT result.xml -PARAM name
>value
>In my stylesheet I try to fetch the parameter using a xsl:value-of
>select="$name"/> but the parameter is unknown. Can someone explain me
>how to fetch this parameter in my stylesheet?
>Thanks a lot
>David.
>--
>David DELGRANCHE - ddelgranche@silicom.fr
>Silicom Rgion Ouest
>80 avenue des Buttes de Coesmes 35700 RENNES (FRANCE)
>Tel: 02 99 84 17 17