RE: [xsl] Why no namespace node KindTest?

Subject: RE: [xsl] Why no namespace node KindTest?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 26 Aug 2006 21:29:21 +0100
>   I wonder why there is no KindTest for namepace nodes.  In 
> particular, we can't write something like:
>     if ( $arg instance of namespace() ) ...

Quite a few people on the WGs don't like namespace nodes, because they have
difficulty implementing them efficiently. This is why the namespace axis has
been deprecated in XPath 2.0, and isn't available at all in XQuery. In fact,
in XQuery there is no expression that returns a namespace node. More
seriously, there is no way of dynamically constructing a namespace node,
which means it is impossible to create an element with namespaces that are
decided dynamically (except for the namespace used in the element name and
attribute names, of course).

Michael Kay

Current Thread