3 @noindent Implements @dfn{Uniform Resource Identifiers} (URI) as
4 @cindex Uniform Resource Identifiers
11 @defunx make-uri fragment
13 @defunx make-uri query fragment
15 @defunx make-uri path query fragment
17 @defunx make-uri authority path query fragment
19 @defunx make-uri scheme authority path query fragment
21 Returns a Uniform Resource Identifier string from component arguments.
24 @defun html:anchor name
25 Returns a string which defines this location in the (HTML) file
26 as @var{name}. The hypertext @samp{<A HREF="#@var{name}">} will link to this point.
29 (html:anchor "(section 7)")
31 "<A NAME=\"(section%207)\"></A>"
35 @defun html:link uri highlighted
36 Returns a string which links the @var{highlighted} text to @var{uri}.
39 (html:link (make-uri "(section 7)") "section 7")
41 "<A HREF=\"#(section%207)\">section 7</A>"
46 Returns a string specifying the @dfn{base} @var{uri} of a document, for
48 inclusion in the HEAD of the document (@pxref{HTML, head}).
51 @defun html:isindex prompt
52 Returns a string specifying the search @var{prompt} of a document, for
53 inclusion in the HEAD of the document (@pxref{HTML, head}).
56 @defun uri->tree uri-reference base-tree @dots{}
57 Returns a list of 5 elements corresponding to the parts
58 (@var{scheme} @var{authority} @var{path} @var{query} @var{fragment})
59 of string @var{uri-reference}. Elements corresponding to absent parts are #f.
61 The @var{path} is a list of strings. If the first string is empty,
62 then the path is absolute; otherwise relative.
64 If the @var{authority} component is a
65 @dfn{Server-based Naming Authority}, then it is a list of the
66 @cindex Server-based Naming Authority
67 @var{userinfo}, @var{host}, and @var{port} strings (or #f). For other
68 types of @var{authority} components the @var{authority} will be a
72 (uri->tree "http://www.ics.uci.edu/pub/ietf/uri/#Related")
74 (http "www.ics.uci.edu" ("" "pub" "ietf" "uri" "") #f "Related")
78 @noindent @code{uric:} prefixes indicate procedures dealing with
82 @defun uric:encode uri-component allows
83 Returns a copy of the string @var{uri-component} in which all @dfn{unsafe} octets
85 (as defined in RFC 2396) have been @samp{%} @dfn{escaped}.
87 @code{uric:decode} decodes strings encoded by @code{uric:encode}.
90 @defun uric:decode uri-component
91 Returns a copy of the string @var{uri-component} in which each @samp{%} escaped
92 characters in @var{uri-component} is replaced with the character it encodes. This
93 routine is useful for showing URI contents on error pages.