[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: servlet to xsl
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|