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 4232 - Incorrect expected error for fn-collection-3
Summary: Incorrect expected error for fn-collection-3
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC All
: P2 minor
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-16 11:37 UTC by Nick Jones
Modified: 2007-03-09 17:09 UTC (History)
0 users

See Also:


Attachments

Description Nick Jones 2007-01-16 11:37:31 UTC
fn-collection-3

fn:collection("invalidURI<>")

expectes FODC0002

15.5.6 of F+O states: "if $arg is not a valid xs:anyURI, an error is raised [err:FODC0004]."

(For what its worth, the recently added K2-SeqCollectionFunc-1

collection("http:\\invalid>URI\someURI")

is testing the same thing, but with the correct error)
Comment 1 Michael Kay 2007-01-16 12:38:27 UTC
You are assuming that "invalidURI<>" is not a valid instance of xs:anyURI.

XML Schema Part 2 says that a string is a valid instance of xs:anyURI if it becomes a valid URI after you apply the escaping procedure defined in section 5.4 of XLink. That procedure escapes "excluded characters listed in Section 2.4 of [IETF RFC 2396], except for the number sign (#) and percent sign (%)". That set includes "<" and ">". So "invalidURI<>" is in fact valid.

As far as I can see, "http:\\invalid>URI\someURI" is also a valid instance of xs:anyURI, for the same reasons. It's pretty meaningless as a URI, but the spec doesn't require it to me meaningful, only syntactically valid.
Comment 2 Nick Jones 2007-01-16 13:16:21 UTC
Ah, yes, thanks I was making that assumption.

But even once it is escaped I still think the error is wrong as then: "If Available collections provides no mapping for the string, an error is raised [err:FODC0004]." applies.

err:FODC0002 is only thrown if there is no arguement and no default collection.
Comment 3 Carmelo Montanez 2007-03-09 16:37:44 UTC
Hey Nick:

Thanks for teh comment.  It looks like FODC0004 is a morte appropriate 
error code for this case.  Changed the expected error to FODC0004.

Thanks,
Carmelo
Comment 4 Nick Jones 2007-03-09 17:09:37 UTC
Thanks