This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Designs for XSLT functions (Was: Re: RE: syntax sugar for call-template)
- To: Uche Ogbuji <uche dot ogbuji at fourthought dot com>
- Subject: Re: Designs for XSLT functions (Was: Re: [xsl] RE: syntax sugar for call-template)
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Tue, 20 Feb 2001 18:28:35 +0000
- CC: xsl-list at lists dot mulberrytech dot com, David dot Rosenborg at pantor dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <200102201454.HAA14420@localhost.localdomain>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Uche,
> Speaking of gnarly, I'm assuming xsl:call-template can be used
> within exsl:function. If so, is it permissible for the exsl:result
> to be in the called template, or so on down the chain?
We could say that xsl:call-template is only allowed within
xsl:variable or xsl:params in exsl:function (i.e. isn't allowed as a
direct child of exsl:function, xsl:if, xsl:when, xsl:otherwise or
xsl:for-each).
We could then ban exsl:result from being instantiated within either
xsl:variable or xsl:param, which I think is a good move anyway. If we
do that, we've effectively banned exsl:result from called templates.
> I'd say "scary thought: no", but how to best restrict this?
> Structurally? ("Every exsl:function must have an exsl:result within
> the nodes in its descendant axis").
There's a good point there about what to do if no exsl:result element
is instantiated. Returning an empty node set would at least stop
function calls from breaking if the result of the function was used as
a node set. Or should it be an unrecoverable error if no exsl:result
is instantiated?
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list