[Bug 11590] Correct the expected result of test functx-fn-namespace-uri-for-prefix-all

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11590

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com

--- Comment #8 from Michael Kay <mike@saxonica.com> 2011-04-25 21:37:03 UTC ---
I agree that the spec is confusing. There are two problems:

(a) The term "default (unnamed) namespace" is nonsense: every namespace has a
namespace name. What is intended is "default namespace".

(b) The sentence "Otherwise, it returns the empty sequence." is preceded by two
conditionals, and it's not clear which one the "otherwise" relates to. I
believe the first is intended.

But I believe that the correct result for namespace-uri-for-prefix('', <a/>) is
() rather than "". No element ever has an in-scope namespace that maps the
prefix "" to the namespace URI "". The definition of the term "in-scope
namespace" comes via XDM from the Infoset: see section 2 clause 7 of
http://www.w3.org/TR/xml-infoset/#infoitem.element

<quote>
The set will include namespace items corresponding to all of the members of
[namespace attributes],  except for any representing declarations of the form
xmlns="" or xmlns:name="", which do not declare a namespace but rather
undeclare the default namespace and prefixes.
</quote>

Because (in the absence of a default namespace) there is no in-scope namespace
that provides a mapping for the prefix "", the following rule from
fn:namespace-uri-for-prefix() takes effect: "Otherwise, it returns the empty
sequence."

I have raised bug #12554 against the spec.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 25 April 2011 21:37:06 UTC