Subject: Re: [xsl] function-available() test on stylesheet functions From: "John McGowan" <john@xxxxxxxxxxxxx> Date: Tue, 17 Jul 2007 15:40:40 -0500 |
When calling function-available() inside of a use-when attribute it will never return true for a user defined function. The specs pretty much say this exactly.
"Note that stylesheet functions are not included in the context, which means that the function function-available will return false in respect of such functions."
So, the combination of using @use-when, and funcion-available() wont work for a user defined function, so is there some other way to do it?
Just tried
<xsl:value-of select="function-available('document')" />
which is an xslt function and which does return true....
I used XSLT 2 / Saxon 8.9. You?
John McGowan wrote: > I was trying to use function-available() to try to determine if a > stylesheet function had been defined. I eventually figured out that > stylesheet functions are not in the proper context to cause > function-available() to ever be true. > > So my question is, is there another way to test to see if a stylesheet > function exists?
-- /John
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] function-available() test, Abel Braaksma | Thread | Re: [xsl] function-available() test, David Carlisle |
Re: [xsl] function-available() test, Abel Braaksma | Date | Re: [xsl] function-available() test, David Carlisle |
Month |