W3C home > Mailing lists > Public > uri@w3.org > February 2003

Relative URIs without scheme?

From: Jim Correia <correia@barebones.com>
Date: Fri, 21 Feb 2003 11:27:21 -0500
To: uri@w3.org
Message-Id: <5A504A2C-45B9-11D7-9D3C-000A27D7C068@barebones.com>

I just want to verify that I am reading the spec correctly here.

Section 3.1 of 2396 says:

>    Relative URI references are distinguished from absolute URI in that
>    they do not begin with a scheme name.  Instead, the scheme is
>    inherited from the base URI, as described in Section 5.2.

And section 5 says:

>       relativeURI   = ( net_path | abs_path | rel_path ) [ "?" query ]

where net_path is

>       net_path      = "//" authority [ abs_path ]

Is the following then correct?

I can write

<a href="//www.example.com/resourcePath">resource</a>

in an HTML document and the scheme will be derived from the base (i.e. 
http or https depending on how the original resource was requested)?

Thanks,
Jim
Received on Friday, 21 February 2003 11:27:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT