9. Author's Address
Roy T. Fielding
Department of Information and Computer Science
University of California
Irvine, CA 92717-3425
U.S.A.
Tel: +1 (714) 824-4049
Fax: +1 (714) 824-4056
EMail: fielding@ics.uci.edu
10. Appendix - Embedding the Base URL in HTML documents
It is useful to consider an example of how the base URL of a document
can be embedded within the document's content. In this appendix, we
describe how documents written in the Hypertext Markup Language
(HTML) [3] can include an embedded base URL. This appendix does not
form a part of the relative URL specification and should not be
considered as anything more than a descriptive example.
HTML defines a special element "BASE" which, when present in the
"HEAD" portion of a document, signals that the parser should use the
BASE element's "HREF" attribute as the base URL for resolving any
relative URLs. The "HREF" attribute must be an absolute URL. Note
that, in HTML, element and attribute names are case-insensitive. For
example:
<!doctype html public "-//IETF//DTD HTML//EN">
An example HTML document
<BASE href="http://www.ics.uci.edu/Test/a/b/c">
... <A href="../x">a hypertext anchor ...
RFC 1808 Relative Uniform Resource Locators June 1995
A parser reading the example document should interpret the given
relative URL "../x" as representing the absolute URL
<URL:http://www.ics.uci.edu/Test/a/x>
regardless of the context in which the example document was obtained.
=9=
THE END |