|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML String as Parameter..
document() is the wrong approach for using parameters. When you want to pass a parameter 'test' to the stylesheet you have to add a global <xsl:param name="test"/> to it: <xsl:stylesheet version="1.0" xmlns:xsl="...."> <xsl:param name="test">default string</xsl:param> </xsl:stylesheet> If you now pass the parameter, test's value 'default string' will be overwritten with the passed value and you can use it via <xsl:value-of select="$test"/> anywhere in the templates. document() is for getting whole XML documents. For example: <xsl:value-of select="document('file.xml')"/> Or when using Cocoon 2 and the cocoon protocol is known: document('cocoon://path/file'). Hope this helps, Joerg > Hi, > I am able to pass the Parameter Now. > But the Problem is that i cannot Load it into a > variable using the document() function. It is Giving > Error 'Cannot convert String in to Node List'. > > Any Solution for This > > Thanks, > Ramesh 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
|






