W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2006

Re: [XSLT 2.0] Extension functions, use-when and function-available()

From: David Carlisle <davidc@nag.co.uk>
Date: Tue, 26 Sep 2006 13:50:09 +0100
Message-Id: <200609261250.k8QCo93h019943@edinburgh.nag.co.uk>
To: colinpauladams@hotmail.com
Cc: public-qt-comments@w3.org

> The implication is that it is because the functions are not in the use-when 
> static context, then available-fumctions will return false.

That's what you want isn't it? But this only applies to
available-functions when executed at compile time in the use-when.
If your function _is_ in the context at run time the same call would
return true then.

use-when="if(function-available(x:foo)) then x:foo() else ....">

shouldn't produce an unknown function error, so function-available has
to return false if x:foo isn't available at compile time.

I now understand that you are saying that this means Florent can't use this
as a test on whether to use a template body that uses x:foo at run time,
which is true, but I'm not sure it's a bug. Perhaps your extension
functions should be always available even if the compile time version
is just a stub that makes an error message. then
would work as desired.

(I'm following up since I started but I should note that I'm not a WG
member so I wouldn't have made the initial response to this thread
if I'd have noticed it was on the official comment list)

Received on Tuesday, 26 September 2006 12:50:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:15 UTC