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

> 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
<xsl:value-of
  use-when="function-available(x:foo)"
  select="x:foo()"/>
would work as desired.

David
(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