GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Hierarchical Absolute URI's Up: URI's Relative and Absolute Previous: URI's Relative and Absolute   Contents

Absolute URI's

Before looking at the nasty details of absolute URI's we'll take a peak at several example absolute URI's to give a feel for how these beasts act in the wild. For example the absolute URI

http://www.math.uio.no/faq/compression-faq/part1.html
is used to locate the file with the file namepart1.html. This file is located on the host with the host name www.math.uio.no in the directory compression-faq which is in the directory faq. This file can be accessed using the HTTP protocol. As another example consider the absolute URI
ftp://ftp.is.co.za/rfc/rfc1808.txt
used to locate the file with the file name rfc1808.txt. This file is located on the host with the host name ftp.is.co.za in the directory rfc. This file can be accessed using the FTP protocol. So, you can see that this absolute URI business is actually relatively easy. The general case is a bit more of a headache.

The general BNF for an absolute URI is:

absoluteURI   = scheme ":" ( hier_part | opaque_part )

hier_part     = ( net_path | abs_path ) [ "?" query ]
opaque_part   = uric_no_slash *uric

uric_no_slash = unreserved | escaped | ";" | "?" | ":" | "@" |
                "&" | "=" | "+" | "$" | ","

net_path      = "//" authority [ abs_path ]
abs_path      = "/"  path_segments
rel_path      = rel_segment [ abs_path ]

rel_segment   = 1*( unreserved | escaped |
                ";" | "@" | "&" | "=" | "+" | "$" | "," )

scheme        = alpha *( alpha | digit | "+" | "-" | "." )

authority     = server | reg_name

reg_name      = 1*( unreserved | escaped | "$" | "," |
                ";" | ":" | "@" | "&" | "=" | "+" )

server        = [ [ userinfo "@" ] hostport ]
userinfo      = *( unreserved | escaped |
                ";" | ":" | "&" | "=" | "+" | "$" | "," )

hostport      = host [ ":" port ]
host          = hostname | IPv4address
hostname      = *( domainlabel "." ) toplabel [ "." ]
domainlabel   = alphanum | alphanum *( alphanum | "-" ) alphanum
toplabel      = alpha | alpha *( alphanum | "-" ) alphanum
IPv4address   = 1*digit "." 1*digit "." 1*digit "." 1*digit
port          = *digit

path          = [ abs_path | opaque_part ]
path_segments = segment *( "/" segment )
segment       = *pchar *( ";" param )
param         = *pchar
pchar         = unreserved | escaped |
                ":" | "@" | "&" | "=" | "+" | "$" | ","

query         = *uric

fragment      = *uric

uric          = reserved | unreserved | escaped
reserved      = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                      "$" | ","
unreserved    = alphanum | mark
mark          = "-" | "_" | "." | "!" | "~" | "*" | "'" |
                "(" | ")"

escaped       = "%" hex hex
hex           = digit | "A" | "B" | "C" | "D" | "E" | "F" |
                "a" | "b" | "c" | "d" | "e" | "f"

alphanum      = alpha | digit
alpha         = lowalpha | upalpha

lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" |
           "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" |
           "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
upalpha  = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
           "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
           "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
digit    = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
           "8" | "9"
What simplicity, what elegance! Now you can see why the Luddites were so pissed. This is the type of thing computers excel at, dealing with such dreck. Lets take a more human scale look at the general absolute URI.

More humanely, a general absolute URI can be viewed as being either a ``hierarchical absolute URI'' or a ``opaque absolute URI.''



Subsections
next up previous contents
Next: Hierarchical Absolute URI's Up: URI's Relative and Absolute Previous: URI's Relative and Absolute   Contents
Andre Merzky 2004-05-13