19 Jun 1995 - Preliminary Information

Managing Links

Most HTML editors expect the user to type in the document referenced (the URL) in order to create a hypertext link. Since it is easy to make a mistake, authors are urged to test their documents thoroughly. SpHyDir provides a simpler and more reliable method of constructing links.

Forming Links from the Desktop

Links to other files in the same library can be constructed using standard Workplace Shell behavior. Hold down Cntrl and Shift and drag the icon of another file in the library to a paragraph or image object in the SpHyDir Workarea. If the link is made to a paragraph object, the Hotword Selection window opens. Use the mouse to select a word or phrase and press the OK button.

Links to remote documents should be managed with the aid of Web Explorer. The SpHyDir philosophy holds that before you generate a link to a document, you should be able to display it in the Browser. There are two fairly direct ways that WE references can be use to generate SpHyDir links.

The simplest option is to use the ability of the current Web Explorer program to generate URL objects. Such objects can be dropped on the desktop, but it is better if they are stored as disk files. They can then be dropped on SpHyDir to generate a link to the corresponding resource.

SpHyDir also provides an XSpO Rexx program named WE_URL.CMD. First use Web Explorer to view the desired network resource. Then drop the WE_URL icon on a paragraph or image in the SpHyDir Workarea. The WE_URL program locates the Web Explorer window on the desktop, extracts the current URL from it, and passes it on to form a link.

The XSpO library supplied with SpHyDir also has MAILTO.CMD, an example of how to form a link that uses the Mailto URL.

Using the Link Manager Window

To display the Link Manager, select it from the Window pulldown menu on the Workarea window. The Link Manager presents two list box areas and a pair of buttons.

Image of the Link Manager Window

The top list box shows the URLs of any links from the current document object selected in the workarea. The number of URLs listed should correspond to the number of pairs of inward pointing triangle dingbat characters in the text of the paragraph. The order of the URLs in the box also corresponds to the order of the hotword phrases in the paragraph. An Image object would have only one link.

To delete a link, select the URL in the top list box and press the Ctrl-D key. The URL is removed from the list, and the triangle dingbat characters will also disappear in the text from around the previous hotword phrase. If a hotword phrase is to be deleted, it is important to remove the link first. SpHyDir has no way to connect hotwords to URLs except to pair them off in order when generating HTML. If a hotword is deleted with the editor, then the following hotword gets paired to the URL that of the deleted link, and the meanings of subsequent hotwords are similarly shifted.

The larger Link Manager list box proposes new links from a database. Two buttons are presented at the bottom to populate this list. The button with the Web Explorer icon fills the box with entries from the current Web Explorer hotlist. The Target button fills it with target labels from the current document.

A target is a lable assigned to a section or paragraph in the middle of the document. HTML 2.0 generates such a label with the <A NAME=xxx> tag. HTML 3.0 also supports the ID attribute on most tags, as in <P ID=xxx>. SpHyDir supports both types of HTML, but its interface is modelled on HTML 3.0.

SpHyDir document objects have an ID Property. When it is set, ID appears in the Properties table for the current object. Any object can be labelled by adding the ID Property. Select the object, click with the Second Mouse button on the whitespace of the Properties table, and select ID from the list of properties. A dialog box appears in which a label value can be typed.

Programmers frequently assume that the labels must be short, or that they cannot contain spaces or special characters, or that they are all uppercase. All these things are wrong. The label can be any reasonable length, it can contain blanks, and is case-sensitive. The label "Case" will not be matched by a search for "case". At this time, SpHyDir cannot guarantee that this or any other property can safely have special characters such as '<', '>', '&', or doublequote.

If links are to be formed manually, then it is probably a good idea to keep the name short. Type one character wrong, even in the wrong case, and the search misses its target. However, if links are formed automatically by selecting a target from a list, then there is no chance of a mistyping. In this case, it makes sense to make the labels longer and more descriptive, so that they can be identified more easily in a larger database.

When the target button at the bottom of the Link Manager is pressed, SpHyDir first seaches the current file for all objects with an ID property. If this document is part of a larger document tree, it then goes up through the Parent Extended Attribute pointers to find the root document, and proceeds down through the tree locating all the other target labels.

At this point, it is not part of the SpHyDir plan to expand the scope of buttons in the Link Manager to other targets in the Library. Rather, XSpOs will be developed to populate the Link Manager list with specialized targets, such as glossary references. If anyone wishes to develop specialized XSpO routines, the names of all targets in an HTML file are stored by SpHyDir in the PCLT-SPHYDIR.TARGETS Extended Attribute.

Continue Back PCLT

Copyright 1995 PCLT -- SpHyDir Web Document Manager -- H. Gilbert
May be distributed with SpHyDir program

This document generated by SpHyDir, another fine product of PC Lube and Tune.