<?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>5705</bug_id>
          
          <creation_ts>2008-05-20 21:46:08 +0000</creation_ts>
          <short_desc>Catalog003 indicates a problematic test case</short_desc>
          <delta_ts>2008-07-08 20:07:23 +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>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</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="Andrew Eisenberg">andrew.eisenberg</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          <cc>mike</cc>
    
    <cc>tim</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20188</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2008-05-20 21:46:08 +0000</bug_when>
    <thetext>Catalog003 checks to see that all error test cases have at least one expected error. This does not appear to be the case for K2-SeqExprCast-421. I believe that the scenario for this test case should be changed to standard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20199</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-21 08:30:31 +0000</bug_when>
    <thetext>Should be fixed in CVS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20414</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-06-09 09:24:35 +0000</bug_when>
    <thetext>This test (K2-SeqExprCast-421) was previously catalogued as expecting error FORG0001. It&apos;s not clear to me why it has changed. The test is

xs:anyURI(&quot;foo://&quot;)

and it seems to me that &quot;foo://&quot; is indeed an invalid URI: RFC3986 states:

When authority is not present, the path cannot begin with two slash characters (&quot;//&quot;)

The rule is less clearly expressed in RFC2396 (which is what Schema Part 2 actually references) but I think it&apos;s still there. 

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20802</commentid>
    <comment_count>3</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-06-24 14:54:38 +0000</bug_when>
    <thetext>Ok, then http://www.w3.org/Bugs/Public/show_bug.cgi?id=5695 was resolved incorrectly. I changed back to the former.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20933</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-06-26 14:28:56 +0000</bug_when>
    <thetext>Sorry, I think foo:// is valid.

Quoting the specification:

hier-part   = &quot;//&quot; authority path-abempty
                  / path-absolute
                  / path-rootless
                  / path-empty

   The scheme and path components are required, though the path may be
   empty (no characters).  When authority is present, the path must
   either be empty or begin with a slash (&quot;/&quot;) character.  When
   authority is not present, the path cannot begin with two slash
   characters (&quot;//&quot;).  These restrictions result in five different ABNF
   rules for a path (Section 3.3), only one of which will match any
   given URI reference.

   The following are two example URIs and their component parts:

         foo://example.com:8042/over/there?name=ferret#nose
         \_/   \______________/\_________/ \_________/ \__/
          |           |            |            |        |
       scheme     authority       path        query   fragment
          |   _____________________|__
         / \ /                        \
         urn:example:animal:ferret:nose

So this is saying that:


                   path-absolute
                   path-rootless
                   path-empty

may not begin with &apos;//&apos;.

path-abempty can begin with &apos;//&apos; even if the authority is the empty string - because the authority is still present.  Note that the empty string is a valid authority (matching the &apos;reg-name&apos; production).

So foo:// is a valid URI with an empty authority and empty path.  The &apos;//&apos; here is _not_ part of the path.

Here&apos;s what Microsoft&apos;s .NET System.Uri class does with this...


$  New-object Uri(&apos;foo://&apos;)


AbsolutePath   : /
AbsoluteUri    : foo:///
Authority      :
Host           :
HostNameType   : Basic
IsDefaultPort  : True
IsFile         : False
IsLoopback     : True
IsUnc          : False
LocalPath      : /
PathAndQuery   : /
Port           : -1
Query          :
Fragment       :
Scheme         : foo
OriginalString : foo://
DnsSafeHost    :
IsAbsoluteUri  : True
Segments       : {/}
UserEscaped    : False
UserInfo       :
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20936</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-06-26 14:51:04 +0000</bug_when>
    <thetext>And this is what Java 5 (class java.net.URI) has to say about it:

new URI(&quot;foo://&quot;)

Exception in thread &quot;main&quot; java.net.URISyntaxException: Expected authority at index 6: foo://

These RFCs are a mess: intelligent implementors can interpret the phrase &quot;when authority is present&quot; in different ways. We&apos;re not trying to test URI class libraries, we should stick to cases that are uncontroversial.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20938</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-06-26 14:57:02 +0000</bug_when>
    <thetext>Interesting!

Where can one get clarification on an RFC?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20940</commentid>
    <comment_count>7</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-06-26 15:09:17 +0000</bug_when>
    <thetext>I agree, the test in CVS now accepts pretty much anything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20941</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-06-26 15:20:22 +0000</bug_when>
    <thetext>Splendid!  That&apos;ll kepp everyone happy :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>