This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Passing paramater in Xalan 1.2
- To: Bassi Suk <bassi dot s at mellon dot com>
- Subject: Re: Passing paramater in Xalan 1.2
- From: Gary L Peskin <garyp at firstech dot com>
- Date: Tue, 14 Nov 2000 02:20:04 -0800
- CC: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Organization: The Firstech Corporation
- References: <20001114095318.14797.qmail@mellon.com>
- Reply-To: xsl-list at mulberrytech dot com
Bassi Suk wrote:
>
> I apologise for the syntax error, but what is the syntax for referencing the
> parameter in the stylesheet?
At the top level, you need:
<xsl:param name="myParam"/>
Then, just reference it with $myParam in an XPath expression.
>
> Moreover, is there any special area that the reference needs to be made?
It's treated just like a parameter that was specified in the stylesheet
itself.
Gary
>
> Thanks.
>
> Suk.
>
> > -----Original Message-----
> > From: Gary L Peskin [SMTP:garyp@firstech.com]
> > Sent: Monday, November 13, 2000 4:11 PM
> > To: xsl-list@mulberrytech.com
> > Subject: Re: Passing paramater in Xalan 1.2
> >
> > Bassi Suk wrote:
> > >
> > > I currently need to pass a parameter into Xalan, and then need to
> > reference
> > > it in the XSLT stylesheet.
> > >
> > > For example:
> > >
> > > java org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo.out
> > > -PARAM myParam "hello world"
> > >
> > > Is the above line correct? What is the syntax for getting the myParam
> > value
> > > back in the stylesheet?
> >
> > Bassi --
> >
> > "hello world" will be interpreted as an XPath expression and an illegal
> > one at that. Try
> >
> > -PARAM myParam "'hello world'"
> >
> > Gary
> >
> >
> > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> *****************************************************************
> DISCLAIMER: The information contained in this e-mail may be confidential
> and is intended solely for the use of the named addressee. Access, copying
> or re-use of the e-mail or any information contained therein by any other
> person is not authorized. If you are not the intended recipient please
> notify us immediately by returning e-mail to the originator.
--
Gary L Peskin
The Firstech Corporation
+1.323.658.1146
http://www.simdate.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list