<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3303</bug_id>
          
          <creation_ts>2006-05-29 15:13:25 +0000</creation_ts>
          <short_desc>fn-base-uri-23 expects the uri to be escaped?</short_desc>
          <delta_ts>2006-09-08 13:21:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>0.9.0</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marc Van Cappellen">marc.van.cappellen</reporter>
          <assigned_to name="Carmelo Montanez">carmelo</assigned_to>
          
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>9902</commentid>
    <comment_count>0</comment_count>
    <who name="Marc Van Cappellen">marc.van.cappellen</who>
    <bug_when>2006-05-29 15:13:25 +0000</bug_when>
    <thetext>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(&lt;anElement xml:base=&quot;http:\\example.com\\examples&quot;&gt;Element content&lt;/anElement&gt;))


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 &quot; $arg cast as xs:string &quot; (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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9921</commentid>
    <comment_count>1</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-06-01 20:40:28 +0000</bug_when>
    <thetext>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 

&quot;http:\\example.com\\examples&quot;

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

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10083</commentid>
    <comment_count>2</comment_count>
    <who name="Marc Van Cappellen">marc.van.cappellen</who>
    <bug_when>2006-06-17 20:32:10 +0000</bug_when>
    <thetext>I confirm this is resolved in XQTS 0.9.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10117</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-06-19 15:33:54 +0000</bug_when>
    <thetext>I believe this resolution is incorrect, and the URI should be escaped.

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

The Base URI specification says in 3.1 &quot;processors must encode and escape [special] characters to obtain a valid URI reference from the attribute value&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10138</commentid>
    <comment_count>4</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-06-19 21:35:44 +0000</bug_when>
    <thetext>Michael:

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

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10425</commentid>
    <comment_count>5</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-07-07 13:26:12 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11514</commentid>
    <comment_count>6</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-09-08 13:21:05 +0000</bug_when>
    <thetext>Given the resoultion of bug 3415 not allowing escaping of special characters, I removed the alternate expected results.  

Thanks,
Carmelo</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>