ThML documents prepared for the Christian Classics Ethereal Library (CCEL) make use of URIs in a particular format, which is location-independent. The idea is that a URI will refer to a particular part of a particular book, whether the book is on a server, or on a CD-ROM, or on a local hard drive, and whether the book is available in the format requested or must me converted from another format.
That the server or client will perform some special processing of these URIs to return the requested document. For example, a client might check the local hard drive or CD-ROM before fetching the document from the network; the server might generate a requested HTML file from the ThML on the fly.
[http://server.domain/]ccel/authorID/bookID[_version].format[|ID][#ID]
The whole URI is except the ID is case insensitive. Since IDs are case sensitive in XML, they are in the URI as well. The server is optional, as is the leading / if a server is not specified. The authorID and bookID are those assigned by the CCEL. The format extension specifies the format requested. The hope is eventually to support the following formats:
Each of these formats will each require writing a stylesheet or program to generate it from the ThML, so they will become available over time; other formats will doubtless be added to the list. (A single DSSSL stylesheet will hopefully generate .htm, .txt, .rtf, .tex, and .pdf.)
The # separator works like a normal HTML hash. The | separator works like an XML link: it returns only the element whose ID is given. If both are given, the requested element is returned and the page is scrolled to the specified ID.
The ID may be an element ID from the ThML document. It may also be one of two special IDs: _About, a machine-generated page of information about the book, and _TOC, a machine-generated table of contents. IDs of the form identifier_TOC return a machine-generated table of contents of the identified element, which would normally be a div1 or other division itself containing divisions.
Note to client implementors: I suggest you set up a standard directory for ThML documents on the hard drive, e.g. c:\CCEL. Then, when a ccel-style URI is activated, look for the document on the hard-drive and CD-ROM first. If it isn't found, try to download from the net.
You may also wish to check occasionally for new docs or new versions of docs on the server if the client is connected to a network. You could offer to download books or versions of books to the client's hard drive. (But how to check for new books or versions? as yet undetermined.)
Finally, in your librarian application, you may wish to get a list of available docs from the CCEL server and offer them to the client. Or, if you have an online catalog, you may wish to include CCEL documents on the server. The plan is eventually to offer a Z39.50 server on the CCEL for this purpose. That way the client need only install the program; and accessed books will be automatically downloaded and installed.
I also plan to store MARC records for books at other locations, not just on the CCEL. That way, your book searches will cover multiple on-line archives. One can imagine a clearinghouse for MARC records for publicly accessible documents. Download the files into your database, or search uzing Z39.50, and you will have searched all publicly accessible documents.