details: \ and | are not actually legal URI characters, but appear in Netscape and/or Internet Explorer (clarify this) to mean / and : respectively. Accordingly, E normalizes \ to / and | to : before passing these to the protocol handler. ***
The URI Unary Expression (left associative)
Example Meaning Value
<file: expr> use a calculated value the File whose name is the value of expr
To look up a file or a web page using a calculated name, rather than a name you know when you write the program, use the URI unary expression:
<protocol-name: expression>
So, for example, both
def name := "c:/jabbertest/jabberwocky.txt"
<file: name>
and
<file:c:/jabbertest/jabberwocky.txt>
mean the same thing. You can also use the URI unary expression to look up names that contain non-URI characters. For example, Windows machines have a top level directory names "Program Files". Since this name contains a space, you can't use the URI literal expression. But
<file: "/Program Files">
is just as good.
The "file:" URI
See Text File I/O.
detail: to accomodate the way modern browsers operate on windows, a one-letter protocol handler is assumed to be a drive letter and turned into a file: uri whose body consists of the original uri. For example,
<a:/jabberwocky.txt>
is turned into
<file:a:/jabberwocky.txt>
which will fetch the file from your A drive (typically, a floppy). ***
Standard URLs (http:, ftp:, gopher:, news:, and mailto:)
These all evaluate to java.net.URL objects. See URLs.
The "import:" URI
After "import:" comes a Java fully qualified class name. If there is a class by this name (or if one can be loaded), that class is the value of this expression. This enables the equivalent of Java's import statement.