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: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: Designs for XSLT functions (Was: Re: [xsl] RE: syntax sugar for call-template)
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Tue, 20 Feb 2001 16:20:22 -0000
- Cc: <David dot Rosenborg at pantor dot com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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?
In Saxon, you can use call-template or apply-templates within a
saxon:function, but it only makes sense within an xsl:variable that catches
the result tree. You can't use saxon:return while instantiating an
xsl:variable; so I decided the simplest rule was that the saxon:return must
be structurally nested within saxon:function.
> ("Every exsl:function must have an exsl:result within the
> nodes in its descendant axis").
Saxon says "every saxon:return element must have an ancestor saxon:function
element". It doesn't say the converse: if no saxon:return is instantiated,
the result is an empty string.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list