Re: converting URLs in .html files

Kevin Altis (kevin@scic.intel.com)
Tue, 31 Aug 1993 11:08:03 -0800


Okay, I already knew about doing relative URLs but in looking at the source
of various HTML documents out in the Web, it seems like absolute paths are
being used a lot. I think two things need to happen. One, existing "sets"
of file should be converted to use relative pathing where possible. Two,
Getting Started, HTML Primers, etc. should emphasize the use of relative
paths over absolute paths; how many people are doing absolute pathing when
it isn't even necessary just because they didn't know better? The same
problem applies to using "http" references when a "file" reference is
adequate?! Maybe a sample HTML set could be put together which utilizes
relative paths throughout the HTML documents, incorporates references to
MPEG, PostScript, GIF, and other non-HTML documents?

Anybody have some self-contained "multi-media" sets of HTML out there that
could be installed at a different site as long as the directory structure
is recreated? Things like the Krannert Art Museum HTML makes lots of
absolute references to the icons, etc. If nothing else, you should be able
to localize those. Maybe www directory trees should contain a "lib"
directory so everyone can store "lib/icons/PointRight.xbm",
"lib/icons/RightArrow.gif", etc. so that relative references to common
elements would work correctly?

The URN stuff may make this unneccesary in a few years but relative pathing
is the best solution today to get around the lack of distributed databases
for the Web.

ka

---
>   Has anyone dealt with automatically converting the URLs within HTML files
>   so that you could take a set of files like the Library of Congress Vatican
>   Exhibit and use them off a local HTTP server rather than across the
>   Internet?
>
>This won't help with the Vatican exhibit, but: If a cluster of related
>files is written using relative URLs, then the only `conversion' you
>need to do is to change the entry point.
>
>That is, if http://sunsite.unc.edu/expo/vatican.exhibit/vatican.exhibit.html
>contained a link to HREF="exhibit/Main_Hall.html", then you could just
>copy all the files over to your local net, and jump to (say)
>file:///my/html/files/vatican.exhibit/vatican.exhibit.html,
>and the reference would now point you to the Main Hall file on your
>local filesystem.
>
>The Vatican exhibit uses absolute URLs, which is a pain for moving or
>copying files.  Oh well.  A cluster of related files using relative
>URLs should be easily portable.  (That's the point of relative URLs,
>as I understand it.)