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

Re: passing param using value-of

Subject: Re: passing param using value-of
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Thu, 16 Feb 2012 23:03:48 +0000
Re:  passing param using value-of
>> This works fine.
>>
>>  <xsl:call-template name="myTemplate">
>>         <xsl:with-param name="arguments" select="preceding-sibling::*">
>>         </xsl:with-param>
>> </xsl:call-template>
>>
>> But this doesn't:
>>
>> <xsl:call-template name="myTemplate">
>>         <xsl:with-param name="arguments">
>>              <xsl:value-of select="preceding-sibling::*" />
>>         </xsl:with-param>
>>  </xsl:call-template>
>>
>> Why ? How do I use value-of to set the value of a parameter ?
>
>
> xsl:value-of generates a (single) text node. Depending on the parameter,
> that may be okay (or maybe not), even if the cases when a text node is good
> but a simple string is not even better are fairly rare.

Don't forget in the 2nd option that it's a text node child of a
document node, whereas in the first option (using select) it's
sequence type is element()*  (i think)

--
Andrew Welch
http://andrewjwelch.com

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.