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

Re: Help calling templates with parameters

Subject: Re: Help calling templates with parameters
From: "cking" <anton@xxxxxxxx>
Date: Wed, 22 Sep 2004 09:32:53 +0200
xslt fragment parameter
Charlie Consumer wrote:
> 
> and once I enter the template the parameter isn't a
> node set like it was before I called the template, but
> a node fragment.  I don't know what a node fragment
> is.  Can anyone explain this?

A result tree fragment (RTF) is what you get if you fill
a param or variable inside the element, instead of in its
select attribute. Like you did in call-template:

>  <xsl:with-param name="currentRule">
>    <xsl:value-of select="current()"/>
>  </xsl:with-param>

In XSLT 1.0, you can't use an RTF in XPath expressions.
You would have to use an extension, eg. from from EXSLT
(www.exslt.org):

<xsl:value-of select="exsl:node-set($currentRule)/blah/@id"/>
<!-- you can't: <xsl:value-of select="$currentRule/blah/@id"/> -->

HTH,
Anton

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.