Changeset 20644 in project


Ignore:
Timestamp:
10/04/10 15:37:25 (8 years ago)
Author:
sjamaan
Message:

Add classification tree to hopefully clarify the relation between the several different types of URIs we have

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/uri-common

    r20643 r20644  
    4242parsed as a relative reference.
    4343
    44 <procedure>(uri-reference? URI) => BOOL</procedure>
    45 
    46 Is the given object a URI reference?  '''All objects created by
    47 URI-common constructors are URI references'''; they are either URIs
    48 or relative references.  The constructors below are just more strict
    49 checking versions of {{uri-reference}}.  They all create
    50 URI references.
    51 
    5244<procedure>(absolute-uri STRING) => URI</procedure>
    5345
     
    6052as a base URI to resolve a relative-ref against, using
    6153{{uri-relative-to}} (see below).
    62 
    63 <procedure>(absolute-uri? URI) => BOOL</procedure>
    64 
    65 Is the given object an absolute URI?
    66 
    67 <procedure>(uri? URI) => BOOL</procedure>
    68 
    69 Is the given object a URI?  URIs are all URI references that include
    70 a scheme part.  The other type of URI references are relative
    71 references.
    72 
    73 <procedure>(relative-ref? URI) => BOOL</procedure>
    74 
    75 Is the given object a relative reference?  Relative references are
    76 defined by RFC 3986 as URI references which are not URIs; they contain
    77 no URI scheme and can be resolved against an absolute URI to obtain
    78 a complete URI using {{uri-relative-to}}.
    79 
    80 <procedure>(uri-path-absolute? URI) => BOOL</procedure>
    81 
    82 Is the {{URI}}'s path component an absolute path?
    83 
    84 <procedure>(uri-path-relative? URI) => BOOL</procedure>
    85 
    86 Is the {{URI}}'s path component a relative path?
    87 
    88 <procedure>(uri-default-port? URI) => BOOL</procedure>
    89 
    90 Is the {{URI}}'s port the default port for the {{URI}}'s scheme?
    9154
    9255==== Accessors
     
    12184 => "example/greeting?hi=there"
    12285</enscript>
     86
     87==== Predicates
     88
     89There are several predicates to check whether objects are URI references (the most general type of an URI-like object), or more specific types of URIs like absolute URIs or relative references. The classification tree of URI-like objects looks a bit like this:
     90
     91              uri-reference                Anything defined by the RFC fits this
     92                /             \
     93             uri      relative-ref          Scheme (uri) or no scheme (relative-ref)?
     94              /
     95      absolute-uri                         No fragment (#blahblah) allowed
     96
     97
     98<procedure>(uri-reference? URI) => BOOL</procedure>
     99
     100Is the given object a URI reference?  '''All objects created by
     101URI-common constructors are URI references'''; they are either URIs
     102or relative references.  The constructors below are just more strict
     103checking versions of {{uri-reference}}.  They all create
     104URI references.
     105
     106<procedure>(absolute-uri? URI) => BOOL</procedure>
     107
     108Is the given object an absolute URI?
     109
     110<procedure>(uri? URI) => BOOL</procedure>
     111
     112Is the given object a URI?  URIs are all URI references that include
     113a scheme part.  The other type of URI references are relative
     114references.
     115
     116<procedure>(relative-ref? URI) => BOOL</procedure>
     117
     118Is the given object a relative reference?  Relative references are
     119defined by RFC 3986 as URI references which are not URIs; they contain
     120no URI scheme and can be resolved against an absolute URI to obtain
     121a complete URI using {{uri-relative-to}}.
     122
     123<procedure>(uri-path-absolute? URI) => BOOL</procedure>
     124
     125Is the {{URI}}'s path component an absolute path?
     126
     127<procedure>(uri-path-relative? URI) => BOOL</procedure>
     128
     129Is the {{URI}}'s path component a relative path?
     130
     131<procedure>(uri-default-port? URI) => BOOL</procedure>
     132
     133Is the {{URI}}'s port the default port for the {{URI}}'s scheme?
    123134
    124135==== Reference Resolution
Note: See TracChangeset for help on using the changeset viewer.