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 3670 - [FS] Missing op:anyURI-equal(A, B)
Summary: [FS] Missing op:anyURI-equal(A, B)
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
: 4898 (view as bug list)
Depends on: 3433
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-07 16:15 UTC by Tim Mills
Modified: 2007-09-30 09:08 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2006-09-07 16:15:52 UTC
Operator op:anyURI-equal(A, B) mentioned in:

http://www.w3.org/TR/xquery-semantics/#sec_operators

is missing in "functions and operators"
Comment 1 Ashok Malhotra 2006-09-07 17:20:26 UTC
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.
Comment 2 Tim Mills 2006-09-13 10:06:59 UTC
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.
Comment 3 Jerome Simeon 2006-09-26 14:41:34 UTC
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
Comment 4 Jerome Simeon 2006-09-26 15:59:09 UTC
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
Comment 5 Tim Mills 2006-09-26 16:05:20 UTC
Great, thanks.
Comment 6 Tim Mills 2007-01-17 09:49:08 UTC
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.
Comment 7 Jerome Simeon 2007-01-30 17:32:07 UTC
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
Comment 8 Jim Melton 2007-02-26 00:07:09 UTC
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). 
Comment 9 Michael Dyck 2007-07-31 18:26:25 UTC
*** Bug 4898 has been marked as a duplicate of this bug. ***
Comment 10 Michael Dyck 2007-09-30 09:05:08 UTC
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.