W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2007

[Bug 4763] 1.0.3dev: K2-InScopePrefixesFunc-12

From: <bugzilla@wiggum.w3.org>
Date: Wed, 27 Jun 2007 09:20:16 +0000
To: public-qt-comments@w3.org
Message-Id: <E1I3ThA-0003jV-Jl@wiggum.w3.org>


frans.englich@telia.com changed:

           What    |Removed                     |Added
         AssignedTo|andrew.eisenberg@us.ibm.com |frans.englich@telia.com

------- Comment #1 from frans.englich@telia.com  2007-06-27 09:20 -------
I have this problem that I forget things after I've finished it -- and that
clearly doesn't work for exotic topics like namespaces!

A reduced, free-standing test case for what we're discussing is, I believe:

declare default element namespace "http://www.example.com/";
count(in-scope-prefixes(element {QName("", "a")} {}))

My implementation and Saxon evaluates this to 2.

The second bullet point in Namespace Declaration Attributes seems
relevant, but contradictory. It says:

"This URI specifies the default element/type namespace of the constructor
expression (overriding any existing default), and is added (with no prefix) to
the in-scope namespaces of the constructed element (overriding any existing
namespace binding with no prefix)." and then continues to say:

"If the namespace URI is a zero-length string, the default element/type
namespace of the constructor expression is set to "none," and any no-prefix
namespace binding is removed from the in-scope namespaces of the constructed

I guess it can be seen as an elaborated way of saying "if the prefix is empty
and the namespace URI is empty, any existing binding to the empty prefix is
removed"(not that I see how there's anything to remove for a newly created

I'm trying to reconstruct why Mike and I implemented it the way we did. The
problem I see is how do you make sure, e.g when serializing, that a node
actually gets the empty default namespace when being attached as a child with a
non-empty namespace, without having an empty binding for the default namespace?
That is, when serializing this:

<e xmlns="http://example.com/">
    {element {QName("", "a")} {}}

how would the result be <e xmlns="http://example.com/"><a xmlns=""/></e>,
without a binding for a's empty namespace?
Received on Wednesday, 27 June 2007 09:20:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:33 UTC