Secondly, the browser can be used on any platform that has a WWW browser ported to it. This includes almost every type of workstation and PC used in the world. Since the actual browser code does not have to run on the machine that the user is using, the only program the user has to run locally is a WWW browser. This enables a much wider audience than if the browser had been written for a single platform.
Another advantage is that the browser itself can run on any machine with a HTTP server. In fact, the browser code itself currently runs on the same server that the documents are stored on.
http://server/path/program?param1=foo+param2=+param3=100Where server is the name of the server, path is the path to the CGI program and program is the name of the CGI program itself. Following the "?" are three parameters; param1, param2, and param3 with values of foo, the empty string, and 100, respectively. When the server receives a URL of this form, it calls the program with the parameter string following the "?". A URL of this form can either be constructed by another program, that knows how to form CGI style URLs, or it can be generated by a browser that knows how to use HTML forms.
The browser described in this document takes six different parameters to specify the what state the browser should be in. Since the browser is executed from the beginning each time the user access it, it has no way of keeping track of the user's current state other than embedding this information in the URL. Once the user has initially accessed the browser via the standard entry point, any URL generated by the browser for the user to use to navigate will contain values for these parameters that allow the browser to determine what its current state should be. A summary of these parameters can be found in Table 6.1 on page 64.(1)
The first parameter is getmethod. This parameter is used to determine where to obtain the digiment being browsed, and can have one of three different values; id, url, or local. If the value is id, then the browser uses a RFC1357 style id to obtain a digiment from a Dienst server. If the value is url, the browser uses an arbitrary url to obtain a digiment. If the value is local, the browser obtains the digiment from a local cache.
The second parameter is id. This parameter contains the RFC1357 style id that is used to obtain a digiment if the getmethod parameter is set to id.
The next parameter is url. This parameter contains a url that will return a valid digiment when referenced. This value is used when getmethod is set to url.
The fourth parameter is pid. This is a local reference number used when caching digiments that have already been obtained via one of the other methods. This value is used when getmethod is set to local.
The fifth parameter is vsn. Its value is the VSN of the digiment part that the user wishes to view.
The final parameter is cid. This parameter contains the Content-ID of the current digiment part that is being browsed. This part can be either a part-list, a body-list or a preferred-order. The combination of this and the vsn parameter can uniquely identify the data object that is being requested.
Table 6.1: Parameters to the digiment browser ------------------------------------------------- URL parameter Parameter meaning ------------------------------------------------- getmethod Which method to use to obtain digiment id ID of the digiment url URL of the digiment pid Reference ID for local caching of digiment vsn VSN requested cid Content-ID of part being browsed -------------------------------------------------
Whenever the browser obtains a digiment from an ID or URL, it also caches the digiment locally in the /tmp directory with a name based on its current process ID, or pid. This pid is the same value used in the pid parameter in the URL. When the browser is called with getmethod set to local, it looks at the pid parameter and checks the /tmp directory to see if the digiment corresponding to that pid is cached there. If it is, it reads the digiment from the cached file. If not, the browser resorts back to the id and url methods respectively. This can improve performance significantly since the digiments are created on the fly. This means that every call to the browser would result in a digiment being created again if the browser requested the digiment from the server each time. By caching the digiment locally, the browser can eliminate this overhead.
First the browser checks that the data it has obtained is a digiment with a valid MIME Content-Type field of multipart/digiment. If not, the browser returns an error. Otherwise, the browser extracts the boundary parameter from the multipart/digiment identifier.
Next, the browser splits the multipart/digiment into its component application/digiments by using the boundary string that it previously extracted. Each of these digiment parts is then placed into an associative array, keyed by its Content-ID. This allows the browser to look up any digiment part based on its Content-ID.
The browser then parses the bibliography part. This basically involves looking for the tags for the title, date of publication, organization, notes, abstract, and authors, and extracting the data from each field. This data is then stored in global variables so all parts of the program can access them for display purposes.
The browser also parses the part-list. This involves scanning each line of the part-list and extracting the digiment-type and content-ID from it. The content-IDs for each part-list are stored in an array, as are the content-IDs for each body-list and for each preferred-order. This allows the browser to quickly access each of the part-lists, body-lists or preferred-orders for a digiment.
The browser then displays a list of options for the user to choose from. First, it will display any preferred-order parts that exist, instructing the user that these are the preferred ways to browse the document. Then it will display any body-list parts that exist, and finally it will display any page-list parts.
Each of these parts is actually a hypertext URL that encodes the correct parameters to instruct the browser to display the correct digiment part. This is done by setting the cid parameter to the content-ID of the part that the user selected, and the vsn parameter to the first VSN in the part.
One exception to this is with page-lists. In this case, the vsn parameter is not set to the first VSN in the list, but actually is set by looking at the page-map associated with that page-list and selecting the VSN of the first page that is not of type "supporting". This allows the user to skip over the supporting pages, which are usually not of interest.
The browser first displays a row of buttons that allow the user to navigate through the digiment. The first four buttons will take the user to the title page (or first page if there is no title page), the previous page, the next page, and the last page, respectively. If the browser is displaying data from a body-list instead of a page-list, then it refers to sections instead of pages. The next button takes the user back to the summary page. The browser then displays a pop-up list that allows the user to select any page or section available. The browser also displays the name of the current page, and its page or body description.
Once again, the buttons actually represent URLs that encode the VSN of the correct page or body section to display. In the case of page-list types, any page that is labeled as a supporting page in the page map is excluded from the title, previous, next, and last buttons. However, these pages can be viewed by using the pop-up menu to go to them directly.
If the type of data being displayed is a GIF image, the browser inserts the image into the HTML document, where it will be displayed by the WWW browser. Any other data type cannot be displayed directly, however. In this case, the browser generates a button that the user can click on to load the specified image or body section.
Finally, the browser generates another set of buttons below the image or link that are identical to those at the top of the page. This is useful when the user is viewing images that require him to scroll to the bottom of the page.
The browser also does not support preferred-order digiment parts, although it would not be difficult to modify it to do so. The browser also does not do extended error checking and recovery, which would be a essential if the browser were to be used in a service environment.