W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 1999

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

From: James Clark <jjc@jclark.com>
Date: Thu, 25 Nov 1999 09:01:01 +0700
Message-ID: <383C985D.F070AC53@jclark.com>
To: mhkay <mhkay@iclway.co.uk>
CC: xsl-editors@w3.org
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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:44:17 UTC