W3C libwww Using

Managing the HyperDoc Object

The HyperDoc object is intended to contain information about data objects, especially hypertext objects that are to be presented to a user. As an example of a definition, you can look at the Line Mode Browser where it is defined in the GridText Module. Here it is called "_HText" object and it contains all information needed to present and manage a data object in a text based environment.

The memory management of the HyperDoc object is also left to the application along with the definition. The Library does not use any information from the object at all - the only interaction is that the access manager checks if a HyperDoc object exists for a given anchor or not as a part of servicing a request. The application can use this to maintain a set of HyperDoc objects in memory as a fast cache. Again, the Line Mode Browser can be used as an example as it keeps the 5 latest accessed hypertext objects in memory (regardless of their size) in order to allow fast back track for the user. The relation to the HTAnchor object requires that there is a link from the HyperDoc to the corresponding anchor in order for the application to do proper garbage collection of the HyperDoc objects.

Even though the Library does not interfere with the contents of the HyperDoc object it does provide an API for managing the object. This API is known as the "HText" API and it is described further in the User's Guide


Henrik Frystyk, libwww@w3.org, @(#) $Id: HyperDoc.html,v 1.12 1996/12/09 03:24:00 jigsaw Exp $