[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML String as Parameter..

Subject: Re: XML String as Parameter..
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Fri, 29 Mar 2002 14:55:13 +0100
cocoon xml string
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.