Dominique Devienne wrote:
Now how do I get the parent? You can parse the path manually, but a URL can
be a jar resource, HTTP address, file location, newsgroup, partial url, etc.

http://archive.ncsa.uiuc.edu/SDG/Software/Mosaic/Demo/url-primer.html

Rather than parsing the path, it's easier and more explicit to simply
declare the root.
Also, this is more powerful since you can do relative imports from the root.
Solving two problems at once. Now the build writer decides how build files
are resolved. They can be relative to the orginal build file as described
above or relative to another root.


As you can see from the code below and how it works, there is no
parsing required. The URL class does it all, and behaves as the URL
RFC dictactes. This is how HTML documents resolve each other. There's
no reason to have any explicit root, although just like in HTML, one
could change the default context for a document using a base-like HTML
attribute.

The fact that you cannot "browse" a URL doesn't mean you can't know
the parent (context) of a given URL, as the code clearly demonstrates
IMHO. --DD


I believe that 'hierarchy' is a feature of protocols within a URL, which ftp, http, jar, file: support, but things like urn: uuid: that handle system thing, they dont.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to