| Subject: Re: [xsl] XML String as Parameter.. From: "Joerg Heinicke" <joerg.heinicke@xxxxxx> Date: Fri, 29 Mar 2002 14:55:13 +0100 | 
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
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] XML String as Parameter.., Ramesh B | Thread | Re: [xsl] XML String as Parameter.., Robert Koberg | 
| [xsl] Error when calling Extension , Ramesh B | Date | Re: [xsl] Error when calling Extens, Joerg Heinicke | 
| Month |