This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The FO says about fn:collection "A dynamic error is raised [err:FODC0004] if $arg is not a valid xs:anyURI." But in XSD1.1 there are no restriction on valid anyURIs (compare 27742) There are some tests (fn-collection-3, K2-SeqCollectionFunc-2, K2-SeqCollectionFunc-1, collection-902, cbcl-collection-001) testing for FODC0004 on invalid anyURIs
Possibly the error description should be updated to reflect that it should be valid according to RFC 3986, or the tests should specify an XSD 1.0 dependency. Note that for fn:doc the error description is slightly different: A dynamic error may be raised [err:FODC0005] if $uri is not a valid URI reference. But this may be vague on purpose. However, also in the case of fn:doc there is no mention of the URI to have to be valid according to the RFC, in fact, the term URI reference is not linked or defined clearly in this context. Looking further, the function fn:collation-key, which takes a URI as well, has no error conditions at all for an invalid URI, I raised that separately: bug 29406.
The tests FODC0004 and FODC0005-1 in misc-CombinedErrorCodes might deserve a further examination, too
The WG agreed at the telcon on the 02/02/16 to add the dependency on XSD 1.0 for the tests specified.
I have reviewed this bug again and I think that this bug should be against the FO spec. The text for fn:collection needs changing to be consistant with fn:doc. i.e.: "A dynamic error may be raised [err:FODC0005] if $uri is not a valid URI."
The same issue exists for uri-collection ofc
I think the rule for all the "resource access" functions should be that when the URI is invalid, the processor is allowed to raise an error but is not required to do so. The relevant functions are: doc doc-available collection uri-collection unparsed-text unparsed-text-lines unparsed-text-available json-doc Current handling of invalid URIs is as follows: doc: MAY raise FODC0005 doc-available: MUST raise FODC0005 collection: MUST raise FODC0004 uri-collection: MUST raise FODC0004 unparsed-text: no specific error; treated the same as "no resource found" unparsed-text-lines - same as unparsed-text unparsed-text-available - returns false json-doc - same as unparsed-text I propose to change doc-available to return false, aligning it with unparsed-text-available. I propose to change collection and uri-collection from MUST to MAY, for alignment with doc(). I propose no change for the unparsed-text family of functions; the cost of a change to make them more consistent with doc and collection is greater than the benefit.
At the meeting on 2016-03-08, the WG agreed to adopt the changes proposed in comment 6.
The changes have been applied, and relevant tests have been updated.
In comment 3 I said >The tests FODC0004 and FODC0005-1 in misc-CombinedErrorCodes might deserve a further examination, too Since the collection tests were changed, those two should be changed, too
(In reply to Benito van der Zander from comment #9) > In comment 3 I said > > >The tests FODC0004 and FODC0005-1 in misc-CombinedErrorCodes might deserve a further examination, too > > Since the collection tests were changed, those two should be changed, too Yes I agree that with the changes mentioned in comment #6 that we should add the alternative error code FODC0002 in the test cases mentioned. I have made the change and committed them to cvs.