This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5703 - extra space in the result of functx-fn-namespace-uri-for-prefix-all
Summary: extra space in the result of functx-fn-namespace-uri-for-prefix-all
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-20 21:27 UTC by Andrew Eisenberg
Modified: 2008-06-24 15:11 UTC (History)
0 users

See Also:


Attachments

Description Andrew Eisenberg 2008-05-20 21:27:19 UTC
The expected result of this test case is " http://datypic.com/pre http://datypic.com/unpre http://datypic.com/pre".

The leading space in this result would be justified if namespace-uri-for-prefix('', $in-xml) returned a zero-length string ($in-xml has no default namespace).

Section 11.2.5, fn:namespace-uri-for-prefix, in F&O, says:

"If $prefix is the zero-length string or the empty sequence, it returns the namespace URI of the default (unnamed) namespace. Otherwise, it returns the empty sequence."

I think that one could interpret this as requiring that an empty-sequence be returned, rather than a zero-length string. This interpretation would remove the leading space from the expected result.

Am I missing something? Should this be brought to the WGs?
Comment 1 Michael Kay 2008-05-20 21:45:38 UTC
I agree that the spec could be clarified here. However, I think that if there is no default namespace, namespace-uri-for-prefix("", $e) should return "" as the expected results suggest. This is consistent with the results of other functions that return the pseudo-URI of the non-namespace, for example namespace-uri($e) and namespace-uri-from-QName("", "fred") both return "".
Comment 2 Frans Englich 2008-05-21 08:15:55 UTC
Yes, I think #1 sounds sensible. I think that's verified by other tests currently, as well.

Maybe close this report, and open an editorial one on the spec?
Comment 3 Frans Englich 2008-06-24 15:10:52 UTC
Ok, closing the report on the test suite. Feel free to open up on the spec.