W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2004

[XSLT 2.0] default namespace for element-available()

From: Michael Kay <mhk@mhk.me.uk>
Date: Mon, 29 Mar 2004 20:43:04 +0100
To: <public-qt-comments@w3.org>
Message-Id: <20040329194320.72BB0A12ED@frink.w3.org>

There's an oddity in the definition of element-available(), which is that it
uses the default namespace if the name is unprefixed.

There's some logic to this: you can write

<stylesheet xmlns="http://www.w3.org/XSL/Transform">

<template match="/">
  <if test="element-available('analyze-string')">...</if>
</template>

</stylesheet>

But since the argument to element-available is a lexical QName constructed
at run time, this actually means there's another value in the XSLT part of
the XPath dynamic context: yet another default namespace. This is the only
XPath construct that used the default namespace in XSLT 1.0.

We need to decide whether to keep this definition as it is, in which case
this default namespace ought to be included in the table in section 2.5.2,
or whether to change the definition, with a small risk of backwards
incompatibility. Since element-available() exists in good measure for
compatibility reasons, I think we probably shouldn't change the spec.

Michael Kay 
Received on Monday, 29 March 2004 14:43:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:07 GMT