Altova Mailing List Archives


Re: [xsl] passing param using value-of

From: Wendell Piez <wapiez@------------.--->
To: xsl-list@-----.------------.---
Date: 2/16/2012 9:54:00 PM
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::*">
>          </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.

Cheers,
Wendell

-- 
======================================================================
Wendell Piez                            mailto:wapiez@m...
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
======================================================================

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.