Using Java to identify link types

When I mentioned the use of Java classes for link typing I was thinking of
something along the following lines (where four of the attributes shown here
are default values taken from the DTD that would not need to be entered by
users but are shown in the following example to indicate how it might work
after expansion):

<subject id="DE-BF2" HyLink 
anchrole="description #SELF english_refs #LIST french_refs #LIST german_refs
#LIST" 
linktypes="Hotspot.class English.class French.class German.class"
codebase="http://www.developer.com//Java"
english_refs="#name1 #id1 #name2 #id2"
french_refs="../fr/&filename;/#ref1 ../fr/&filename;/ref2
../fr/index.html#FR-BF"
german_refs='http://www.developer.com/docs/de/index.html#SDQL(match (element
term) "Schwarzwald")'>
Black Forest</subject>

In this case the contents of the element form its description, which is
linked to the the Hotspot Java class, which would know how to display
HotSpots using the rules fixed by the document developer, whose URL base for
Java modules is shown in the codebase attribute.

The English references are to be displayed (under an English flag in the
margin?) in a way controlled by the English.class macro at the developer's
site. The references are taken from entries in the same document that have
been identified either using an HTML anchor with a name attribute or an SGML
id. 

The French references, which are to be displayed using the rules specified
in the French.class macro, are located in different files stored in a
different subdirectory to the one containing the referenced document. They
have been identified using relative URLs. In two cases the relative URL
contains an entity reference that maps to the file name for this document.
(I am presuming here that there is a convention that each document has a
filename entity that acts as a self identifier)

The German reference, which are to be displayed using the rules specified in
the German.class macro, are called using an SDQL query. (This could equally
well have been an HTML/HTTP query or a TEI query - I only used the SDQL
option to indicate how one could simply query an SGML tree using DSSSL.)

If a single method was used for displaying all the entries at once, which
was located at the client, and if details of the locations were stored as
HyTime location addresses, the above example could be simplified to:

<subject id="DE-BF2" HyLink 
anchrole="description #SELF english_refs #LIST french_refs #LIST german_refs
#LIST" 
linktypes="Menu.class"
english_refs="BF-refs-en"
french_refs="BF-refs-fr"
german_refs="BF-refs-de">
Black Forest</subject>

If you leave the HyTime stuff to the DTD (where it would normally sit) you get.

<subject id="DE-BF2"
english_refs="BF-refs-en"
french_refs="BF-refs-fr"
german_refs="BF-refs-de">
Black Forest</subject>

Now thats what I call an easy to key example of a complex multi-headed link!
(OK I've ducked explaining how the referenced links get defined as location
addresses, but that is done in another, separately managed, part of the
document, not within the text.)
----
Martin Bryan, The SGML Centre, Churchdown, Glos. GL3 2PU, UK 
Phone/Fax: +44 1452 714029   WWW home page: http://www.u-net.com/~sgml/

Received on Saturday, 25 January 1997 03:12:21 UTC