[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] passing param using value-of

Subject: Re: [xsl] passing param using value-of
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 16 Feb 2012 16:54:16 -0500

Hi Mansour,

On 2/16/2012 4:19 PM, Mansour Al Akeel wrote:
This works fine.

  <xsl:call-template name="myTemplate">
         <xsl:with-param name="arguments" select="preceding-sibling::*">

But this doesn't:

<xsl:call-template name="myTemplate">
         <xsl:with-param name="arguments">
              <xsl:value-of select="preceding-sibling::*" />

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.


Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

Current Thread