W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 2002

RE: XSLT 2.0: function-available() for stylesheet functions

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Mon, 15 Apr 2002 16:47:27 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210602679D32@daemsg02.software-ag.de>
To: "'Bohlmann, Karsten'" <karsten.bohlmann@sap.com>, "'xsl-editors@w3.org'" <xsl-editors@w3.org>
> the 2.0 spec says that function-available() can be used to 
> test for the
> existence of functions defined with xsl:function.
> 
> I always thought that the function-available() and element-available()
> functions are there to inquire properties of the 
> *implementation*. I think
> it's a bad idea to mix this purpose with the inquiry of 
> properties of the *program*.
> 
I don't think function-available() is especially useful in conjunction with
stylesheet-defined functions (because the user knows statically whether the
function exists or not). On the other hand, it either has to return true or
false when the argument is the name of a stylesheet-defined function, and it
seems more logical to return true.

I agree this means that the processor potentially has to keep a list of
function names available at run-time. However, it only has to do this in the
rare event that the stylesheet actually contains a call to
function-available() with an argument that isn't known statically. I would
prefer to place this burden on implementations, rather than returning the
surprising result of "false" when the user tests whether a stylesheet
function is available.

Michael Kay 
Received on Monday, 15 April 2002 10:47:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:53 GMT