Subject: Re: [xsl] servlet to xsl From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Thu, 13 Jun 2002 09:05:46 +0100 |
Hi Shaik, > Could you please tell me how could i get the set Parameter in .xsl ? First, you have to declare a stylesheet parameter of the same name using an xsl:param element at the top level of the stylesheet (as a child of xsl:stylesheet): <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="xslSpec" /> ... </xsl:stylesheet> You can use a select attribute, or the content of the xsl:param element, to specify a default value for the parameter when the stylesheet's used without fixing it (e.g. using .setParameter()). Then, throughout the rest of the stylesheet, you can access the value of that parameter like you do variable values, using the variable reference $xslSpec. For example: <xsl:template match="rating-and-specification"> <xsl:value-of select="$xslSpec" /> </xsl:template> The ability to declare and use stylesheet parameters is built in to XSLT -- you don't have to use extension functions to do it. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] servlet to xsl, shaik | Thread | [xsl] Re: Date Parsing (Was: Docume, Peter Davis |
RE: [xsl] FO questions about blocks, DPawson | Date | Re: [xsl] Making groups of N elemen, Antonio Fiol |
Month |