This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: unable to pass parameters from jsp
- From: "J.Pietschmann" <j3322ptm at yahoo dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 01 Apr 2002 13:14:15 +0200
- Subject: Re: [xsl] unable to pass parameters from jsp
- References: <20020401105933.91155.qmail@web14602.mail.yahoo.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Aseef Jamaluddin wrote:
> I am still doing my beginers in xml. I am trying to
> pass a parameter from a jsp page which can be accessed
> from my style sheet.
...
> <?xml version="1.0"?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> <xsl:template match="/">
> <xsl:param name="firstParam"/>
You declared a parameter for the template matching "/".
A stylesheet parameter is a child element of the
stylesheet element. Try this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="firstParam"/>
<xsl:template match="/">
<xsl:value-of select="firstParam"/>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list