Re: Designs for XSLT functions (Was: Re: [xsl] RE: syntax sugar for call-template)

Subject: Re: Designs for XSLT functions (Was: Re: [xsl] RE: syntax sugar for call-template)
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Mon, 19 Feb 2001 18:53:24 +0000

Jeni Tennison wrote:
> 
> Hello everyone,
> 
> 1. Declaring Functions
> ----------------------
> 
> 1.a. Using xsl:template vs. using exsl:function
> 

I'd like to register a hesitant vote for exsl:function - if I understand
the issues correctly, exsl:function is a better match with exsl:return
element, and the arguments for that seem pretty conclusive.

> 
> ---
> 
> 1.b. Top-level declaration vs. declaration within xsl:script
> 

I vote for definition within xsl:script - I don't think xsl:script is
going to go away, and my key objective is to have an XSLT extension
functions feature that is, in practice, at least as "standard" and as
"portable" as xsl:script extensions in the offically blessed java and
ecmascript. 

But this all depends on the attitude of the implementors...

> ---
> 
> 1.c. exsl:return and/or result tree fragments
> 

only exsl:return, though as someone else suggested, including return by
content as well as by select attribute.

> 
> 2. Calling Functions
> --------------------
> 
> 2.a. exsl:function() vs. my:func()
> 

definitely my:func(), for usability, but happy to have exsl:function()
too if this is satisfactory from an engineering / performance poit of
view - what do the implementors think?

> 
> ---
> 
> 2.b. Passing parameters by position vs. name
> 

I like the later suggestion by Uche and you of pass by position for
my:func() and pass by name for exsl:function().

Many thanks Jeni and everyone - I'm going to be keeping fairly quiet on
this, but only because I don't have a lot to contribute on the
engineering issues - I shall still be reading the thread with breath
held!

Francis.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread