Debian lenny version packages
[pkg-perl] / deb-src / liburi-perl / liburi-perl-1.35.dfsg.1 / t / roytest4.html
1 <HTML><HEAD>
2 <TITLE>Examples of Resolving Relative URLs, Part 4</TITLE>
3 <BASE href="fred:///s//a/b/c">
4 </HEAD><BODY>
5 <H1>Examples of Resolving Relative URLs, Part 4</H1>
6
7 This document has an embedded base URL of
8 <PRE>
9    Content-Base: fred:///s//a/b/c
10 </PRE>
11 in order to test a notion that Tim Berners-Lee mentioned regarding
12 the ability of URIs to have a triple-slash (or even more slashes)
13 to indicate higher levels of hierarchy than those already used by URLs.
14
15 <H2>Tested Clients and Client Libraries</H2>
16
17 <DL COMPACT>
18 <DT>[R]
19 <DD>RFC 2396 (the right way to parse)
20 <DT>Tim
21 <DD>Tim Berners-Lee's proposed interpretation
22 <DT>[1]
23 <DD>Mozilla/4.03 [en] (X11; U; SunOS 5.5 sun4u; Nav)
24 <DT>[2]
25 <DD>Lynx/2.7.1 libwww-FM/2.14
26 <DT>[3]
27 <DD>MSIE 3.01; Windows 95
28 <DT>[4]
29 <DD>NCSA_Mosaic/2.6 (X11;SunOS 4.1.2 sun4m)
30 </DL>
31
32 <H3>Synopsis</H3>
33
34 RFC 1808 specified that the highest level for relative URLs is indicated
35 by a double-slash "//", and therefore that any triple-slash would be
36 considered a null site component, rather than a higher-level component
37 than the site component (as proposed by Tim).<P>
38
39 The URI draft assumes that a triple-slash means an empty site component.
40 Netscape Navigator behaves irrationally, apparently because their parser
41 is scheme-dependent and therefore doesn't do the hierarchical parsing that
42 would be expected.  Oddly, Lynx seems to straddle both sides.
43
44 <H2>Examples</H2>
45 <PRE>
46                   RESULTS                       from
47
48 <a href="g:h">g:h</a>            =  g:h                           [R,Tim,2,3]
49                   fred:///s//a/b/g:h            [1]
50
51 <a href="g">g</a>              =  fred:///s//a/b/g              [R,Tim,1,2,3]
52
53 <a href="./g">./g</a>            =  fred:///s//a/b/g              [R,Tim,2,3]
54                   fred:///s//a/b/./g            [1]
55
56 <a href="g/">g/</a>             =  fred:///s//a/b/g/             [R,Tim,1,2,3]
57
58 <a href="/g">/g</a>             =  fred:///g                     [R,1,2,3]
59                   fred:///s//a/g                [Tim]
60
61 <a href="//g">//g</a>            =  fred://g                      [R,1,2,3]
62                   fred:///s//g                  [Tim]
63
64 <a href="//g/x">//g/x</a>          =  fred://g/x                    [R,1,2,3]
65                   fred:///s//g/x                [Tim]
66
67 <a href="///g">///g</a>           =  fred:///g                     [R,Tim,1,2,3]
68
69 <a href="./">./</a>             =  fred:///s//a/b/               [R,Tim,2,3]
70                   fred:///s//a/b/./             [1]
71
72 <a href="../">../</a>            =  fred:///s//a/                 [R,Tim,2,3]
73                   fred:///s//a/b/../            [1]
74
75 <a href="../g">../g</a>           =  fred:///s//a/g                [R,Tim,2,3]
76                   fred:///s//a/b/../g           [1]
77
78 <a href="../../">../../</a>         =  fred:///s//                   [R]
79                   fred:///s//a/../              [Tim,2]
80                   fred:///s//a/b/../../         [1]
81                   fred:///s//a/                 [3]
82
83 <a href="../../g">../../g</a>        =  fred:///s//g                  [R]
84                   fred:///s//a/../g             [Tim,2]
85                   fred:///s//a/b/../../g        [1]
86                   fred:///s//a/g                [3]
87
88 <a href="../../../g">../../../g</a>     =  fred:///s/g                   [R]
89                   fred:///s//a/../../g          [Tim,2]
90                   fred:///s//a/b/../../../g     [1]
91                   fred:///s//a/g                [3]
92
93 <a href="../../../../g">../../../../g</a>  =  fred:///g                     [R]
94                   fred:///s//a/../../../g       [Tim,2]
95                   fred:///s//a/b/../../../../g  [1]
96                   fred:///s//a/g                [3]
97 </PRE>
98 </BODY></HTML>