Re: Request for clarification: element-available() function

mhkay wrote:

> Section 2.4, Qualified Names, states that a QName is expanded without using
> the default namespace for unprefixed names. But the kinds of names this
> covers doesn't include the names of XSL instructions or extension elements.
> Section 14.1 makes it clear that the default namespace can be used for
> extension elements, and it's also (reasonably) clear that the XSLT namespace
> can be the default namespace (I read "stylesheets can use any prefix" in
> section 2.1 as meaning "any prefix or none").

I agree. So long as you follow the Namespaces Rec, you should be able to
use any prefix.

> So it would seem logical that
> the QName argument to the element-available function is expanded taking the
> default namespace into account.

That does seem the logical behavior.

> But since this would be about the only place
> in XSLT that this happens, I would expect the spec to say so explicitly if
> that were intended.

I agree the spec is unclear.

> The description of element-available() in section 15
> gives no clues one way or the other.
> 
> Specifically, can I write:
> 
> <stylesheet
>  xmlns="http://www.w3.org/1999/XSL/Transform"
>  version="1.0">
> <variable name="supports-apply-imports"
>  select="element-available('apply-imports')"/>

I think you should be able to. The spec needs clarification here,
because with function-available, the default namespace shouldn't be
used, but the wording in the spec is the same.

> Are there any [other] places where QName expansion uses the default
> namespace?

The name attribute on xsl:element, when you don't specify a namespace
attribute.

James

Received on Wednesday, 24 November 1999 21:42:15 UTC