This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unable to pass parameters from jsp


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]