Changeset 13234 in project


Ignore:
Timestamp:
02/10/09 00:17:38 (11 years ago)
Author:
sjamaan
Message:

Update uri-common's docs to match the new changes that match those in uri-generic

File:
1 edited

Legend:

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

    r13217 r13234  
    2424import and prefix or rename procedures.
    2525
    26 ==== Constructors
     26==== Constructors and predicates
    2727
    2828These constructors fully decode their arguments, so afterwards it is
     
    3535component's original encoding to be lost, so be careful!
    3636
    37 <procedure>(uri-reference string) => uri-common</procedure>
     37<procedure>(uri-reference STRING) => URI</procedure>
    3838
    3939A URI reference is either a URI or a relative reference (RFC 3986,
     
    4242parsed as a relative reference.
    4343
    44 <procedure>(absolute-uri string) => uri-common</procedure>
     44<procedure>(uri-reference? URI) => BOOL</procedure>
     45
     46Is the given object a URI reference?  '''All objects created by
     47URI-generic constructors are URI references'''; they are either URIs
     48or relative references.  The constructors below are just more strict
     49checking versions of {{uri-reference}}.  They all create
     50URI references.
     51
     52<procedure>(absolute-uri STRING) => URI</procedure>
    4553
    4654Parses the given string as an absolute URI, in which no fragments are
    47 allowed (RFC 3986, Section 4.2)
     55allowed.  If no URI scheme is found, or a fragment is detected, this
     56raises an error.
     57
     58Absolute URIs are defined by RFC 3986 as non-relative URI references
     59without a fragment (RFC 3986, Section 4.2).  Absolute URIs can be used
     60as a base URI to resolve a relative-ref against, using
     61{{uri-relative-to}} (see below).
     62
     63<procedure>(absolute-uri? URI) => BOOL</procedure>
     64
     65Is the given object an absolute URI?
     66
     67<procedure>(uri? URI) => BOOL</procedure>
     68
     69Is the given object a URI?  URIs are all URI references that include
     70a scheme part.  The other type of URI references are relative
     71references.
     72
     73<procedure>(relative-ref? URI) => BOOL</procedure>
     74
     75Is the given object a relative reference?  Relative references are
     76defined by RFC 3986 as URI references which are not URIs; they contain
     77no URI scheme and can be resolved against an absolute URI to obtain
     78a complete URI using {{uri-relative-to}}.
    4879
    4980==== uri-generic and string representation
     
    6495URI.
    6596
    66 
    67 ==== Predicates and Accessors
     97==== Accessors
    6898
    6999* <procedure>(uri-scheme uri-common) => symbol</procedure>
     
    83113Update the specified keys in the URI-common object in a functional way
    84114(ie, it creates a new copy with the modifications).
    85 
    86 * <procedure>(uri? URI) => BOOL</procedure>
    87 
    88 Is the given object an URI-common object?
    89 
    90 * <procedure>(relative-ref? URI) => BOOL</procedure>
    91 
    92 Is the given object a relative reference?  Relative references are
    93 defined by RFC 3986 as URI references which are not URIs; they contain
    94 no URI scheme and can be resolved against an absolute URI to obtain
    95 a complete URI using {{uri-relative-to}}.
    96 
    97 * <procedure>(absolute-uri? URI) => BOOL</procedure>
    98 
    99 Is the given object an absolute URI?  Absolute URI is defined by
    100 RFC 3986 as a non-relative URI reference without a fragment.  Absolute
    101 URIs can be used as a base URI to resolve a relative-ref against, using
    102 {{uri-relative-to}}.
    103115
    104116==== Reference Resolution
     
    173185=== Version History
    174186
    175 * trunk Add predicates for absoluteness/relativeness, matching the ones in uri-generic.
     187* trunk Add predicates for URIs, absolute URIs and relative references, matching the ones in uri-generic.
    176188* 0.1 Initial Release
    177189
Note: See TracChangeset for help on using the changeset viewer.