source: trunk/abcl/doc/design/pathnames/url-pathnames.markdown @ 12572

Last change on this file since 12572 was 12572, checked in by Mark Evenson, 13 years ago

Move document to proper location.

File size: 3.2 KB
Line 
1URL Pathnames ABCL
2==================
3
4    Mark Evenson
5    Created:  25 MAR 2010
6    Modified: 26 MAR 2010
7
8Notes towards an implementation of URL references to be contained in
9Common Lisp `PATHNAME` objects within ABCL.
10
11
12References
13----------
14
15RFC3986   Uniform Resource Identifier (URI): Generic Syntax
16
17
18URL vs URI
19----------
20
21We use the term URL to describe the URL Pathnames, even though RFC3986
22notes that its use should be obsolete because in the context of Common
23Lisp Pathnames all need a lookup mechanism to be resolved or they
24wouldn't be of much use.
25
26Goals
27-----
28
291.  Use Common Lisp pathnames to refer to representations referenced
30by a URL.
31
322.  The URL schemes supported shall include at least "http", and those
33enabled by the URLStreamHandler extension mechanism.
34
353.  Use URL schemes that are understood by the java.net.URL object.
36
37    A file specified by URL
38   
39        #p"http://example.org/org/armedbear/systems/pgp.asd"
40   
414.  MERGE-PATHNAMES
42
43        (merge-pathnames "url.asd"
44            "http://example/org/armedbear/systems/pgp.asd")
45        ==> "http://example/org/armedbear/systems/url.asd"
46
475.  PROBE-FILE returning the state of URL accesibility.
48
496.  TRUENAME "aliased" to PROBE-FILE signalling an error if the URL is
50not accessible (see "Non-goal 1").
51
527.  DIRECTORY for non-wildcards
53
548.  URL pathname work as a valid argument for OPEN with :DIRECTION :INPUT.
55
569.  Enable the loading of ASDF2 systems referenced by a URL pathname.
57
5810.  The reserved URL characters (`~`, `/`, `?`, etc.) shall be
59encoded in the proper manner on construction of the Pathname.
60
6111.  The "file" scheme will continue to be represented by an
62"ordinary" Pathname.
63
6412.  The "jar" scheme will continue to be represented by a jar
65Pathname.
66
67
68Non-goals
69---------
70
711.  We will not implement canonicalization of URL schemas (such as following
72"http" redirects).
73
742.  DIRECTORY working for URL pathnames containing wildcards.
75
76
77Implementation
78--------------
79
80A PATHNAME refering to a resource referenced by a URL is known as a
81URL PATHNAME.
82
83A URL PATHNAME always has a HOST component which is a proper list.
84This list will be an association list (alist).  The association list
85values must be a string.
86
87    :SCHEME
88        Scheme of URI ("http", "ftp", "bundle", etc.)
89    :AUTHORITY   
90        Valid authority according to the URI scheme.  For "http" this
91        could be "example.org:8080".
92       
93The DIRECTORY, NAME and TYPE fields of the PATHNAME are used to form
94the URI `path` according to the conventions of the UNIX filesystem
95(i.e. '/' is the directory separator). If needed, `query` and `fragment`
96portions of a URL are to be included in the URL pathname NAME
97component.  In a sense the HOST contains the base URL, to which the
98`path` is a relative URL.
99
100For the purposes of PATHNAME-MATCH-P, two URL pathnames may be said to
101match if their HOST compoments are EQUAL, and all other components are
102considered to match according to the existing rules for Pathnames.
103
104A URL pathname must have a DEVICE whose value is NIL.
105
106Upon creation, the presence of ".." and "." components in the
107DIRECTORY are removed.  The DIRECTORY component, if present, is always
108absolute.
109
110The namestring of a URL pathname shall be formed by the usual
111conventions of a URL.
112
113
114Status
115------
116
117This design is a proposal.
Note: See TracBrowser for help on using the repository browser.