Next: Security
Up: URI's Relative and Absolute
Previous: Opaque Absolute URI's
  Contents
Relative URI's allow one to locate a abstract or physical resource relative to a second abstract or physical
resource. As this second abstract or physical resource is usually identified by an hierarchical absolute URI, one can
think of a relative URI as a means of locating a abstract or physical resource relative to an hierarchical absolute URI.
In practice one is presented with a hierarchical absolute URI of the form
http://www.math.uio.no:666/faq/compression-faq/part1.html
say, then is given a relative URI of the form
part2.html
Resolving this relative URI against the first hierarchical absolute URI then gives the hierarchical absolute URI
http://www.math.uio.no:666/faq/compression-faq/part2.html
However, if we were to resolve the above relative URI against the hierarchical absolute URI
http://www.slashdot.org/index.html
we would obtain the following hierarchical absolute URI
http://www.slashdot.org/part2.html
As you can see the process of resolving a relative URI with respect to a hierarchical absolute URI is child's play.
Usually this resolution process is used within HTML documents. A given HTML document may refer to a second
HTML document using a relative URI. The hierarchical absolute URI with which this relative URI is to be resolved
against is, for the majority of the cases, understood to be that of the containing document. So, for example,
if in the HTML document with the hierarchical absolute URI
http://www.math.uio.no:666/faq/compression-faq/part1.html
there existed a reference to another HTML document of the form
<a href="part2.html">Want more? I dare you!</a>
then this reference would refer to the hierarchical absolute URI
http://www.math.uio.no:666/faq/compression-faq/part2.html
Next: Security
Up: URI's Relative and Absolute
Previous: Opaque Absolute URI's
  Contents
Andre Merzky
2004-05-13
|