This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Operator op:anyURI-equal(A, B) mentioned in: http://www.w3.org/TR/xquery-semantics/#sec_operators is missing in "functions and operators"
My recollction is that we agreed to remove op:anyURI-equal from the F&O when we decided that URIs would be compared like strings.
Presumably the additional typechecking rule: ------------------------------------------------- statEnv |- xs:anyURI can be promoted to xs:string is also required? XQTS test fn-document-uri-12 appears to requires such a rule, because in: fn:contains(fn:document-uri($input-context1),\"works-mod\") fn:document-uri returns xs:anyURI?, while fn:contains only takes xs:string? arguments.
I think there are some inconsistencies in the formal semantics here. I believe the following changes should fix them: (1) replace the line: fs:eq(A, B) xs:anyURI xs:anyURI op:anyURI-equal(A, B) xs:boolean in the operator's table by: fs:eq(A, B) xs:anyURI xs:anyURI op:numeric-equal(fn:compare(A, B), 0) since URIs are now compared as strings. (2) Add the type promotion judgment from xs:anyURI to xs:string as suggesed by Tim: ------------------------------------------------- statEnv |- xs:anyURI can be promoted to xs:string - Jerome
Tim, The XSLT and XML Query working groups have looked at your comment, and decided to close it by adopting the two listed changes below to the the Formal Semantics document. Let us know if you are ok with that resolution. Best, - Jerome On behalf XSLT and XML Query WGs
Great, thanks.
The type promotion rule doesn't appear to have made it into the FS document dated 21 November 2006. XQTS test K2-BaseURIProlog-4 requires this promotion.
Ouch. And it's not in the REC document from january 23rd either. I thought it had been done, but must have fall into the cracks. It will have to go into an errata. Thanks for pointing this out. - Jerome
The fix for this bug does not appear in the Recommendation of 23 January 2007. It will be considered for a future publication (either an Errata document or some possible future version of the specification).
*** Bug 4898 has been marked as a duplicate of this bug. ***
This issue has been entered as FS erratum E010. The changes proposed in Comment #3 (plus a similar change for the fs:ne case) have been committed to the source files for the next edition of the FS document. Consequently, I'm marking this issue resolved-FIXED, and CLOSED.