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 3303 - fn-base-uri-23 expects the uri to be escaped?
Summary: fn-base-uri-23 expects the uri to be escaped?
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.9.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-29 15:13 UTC by Marc Van Cappellen
Modified: 2006-09-08 13:21 UTC (History)
0 users

See Also:


Attachments

Description Marc Van Cappellen 2006-05-29 15:13:25 UTC
fn-base-uri-23 expects the URI to be escaped:
  http:%5C%5Cexample.com%5C%5Cexamples
Should that really be escaped?

The query is as follows:

fn:string(fn:base-uri(<anElement xml:base="http:\\example.com\\examples">Element content</anElement>))


In http://www.w3.org/TR/xquery-operators/#func-string we read:

If $arg is an atomic value, then the function returns the same string as is returned by the expression " $arg cast as xs:string " (see 17 Casting).

And in http://www.w3.org/TR/xquery-operators/#casting-to-string:

If ST is xs:anyURI, the type conversion is performed without escaping any characters.

Thanks,
Marc
Comment 1 Carmelo Montanez 2006-06-01 20:40:28 UTC
Marc:

Thanks for raising this issue.  After the Testing Task Force disccussed this issue, we decided that there are no statements in the specs to justify escaping, and thus changed the expected results to 

"http:\\example.com\\examples"

as you suggested.  Please close this bug if you agree.

Thanks,
Carmelo
Comment 2 Marc Van Cappellen 2006-06-17 20:32:10 UTC
I confirm this is resolved in XQTS 0.9.4
Comment 3 Michael Kay 2006-06-19 15:33:54 UTC
I believe this resolution is incorrect, and the URI should be escaped.

The XDM specification says in 5.2 "The dm:base-uri accessor returns the base URI of a node as a sequence containing zero or one URI reference", and refers to [XML Base] for further information.

The Base URI specification says in 3.1 "processors must encode and escape [special] characters to obtain a valid URI reference from the attribute value"
Comment 4 Carmelo Montanez 2006-06-19 21:35:44 UTC
Michael:

I will bring this to the Task force once more.  perhaps the WG have
an opinion?

Carmelo
Comment 5 Carmelo Montanez 2006-07-07 13:26:12 UTC
Marc/Michael:

Given that the Working group will be deciding on this in the near future,
we (task force) decided to allow both expected outcomes for the time being.

I will leave the bug open for now.

Thanks,
Carmelo
Comment 6 Carmelo Montanez 2006-09-08 13:21:05 UTC
Given the resoultion of bug 3415 not allowing escaping of special characters, I removed the alternate expected results.  

Thanks,
Carmelo