[Bug 6807] [FO] ambiguity in fn:namespace-uri-for-prefix

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





--- Comment #2 from Michael Kay <mike@saxonica.com>  2009-04-28 12:35:06 ---
Investigation shows that different implementors have indeed interpreted this
differently: some return "", some ().

In favour of "":

* this means that a return result of () always means the prefix is not
available for use

* the prefix "" in this situation means "no namespace", and in other functions
such as namespace-uri(), or namespace-uri-from-QName(), "no namespace" is
denoted by "".

* This intepretation means that a redundant "xmlns=''" declaration has no
effect, which is desirable, since it has no meaning.

* this is what the spec currently says:

"If $element has an in-scope namespace whose namespace prefix is equal to
$prefix..." - not applicable, it doesn't.

"If $prefix is the zero-length string ..., it returns the namespace URI of the
default (unnamed) namespace. - the condition is satisfied, so the only question
is "what is the namespace URI of the default (unnamed) namespace?" In other
methods, it is always "".

"Otherwise, it returns the empty sequence." - not applicable, we don't get this
far.

Michael Kay


-- 
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 Tuesday, 28 April 2009 12:35:16 UTC