Re: XS: out of line links

Subject: Re: XS: out of line links
From: James Clark <jjc@xxxxxxxxxx>
Date: Sat, 31 May 1997 12:41:59 +0700
At 10:36 24/05/97 -0500, W. Eliot Kimber wrote:
>At 11:11 AM 5/24/97 +0700, James Clark wrote:
>>At 20:33 23/05/97 EDT, lee@xxxxxx wrote:
>>>In general, the ability to apply styles to selected regions of a document
>>>seems important to me.  For example, if I add an annotation, perhaps I want
>>>a little picture of a pencil in the margin.  I'd like to mark link ends
>>>(whatever they end up being called -- I still like "airports" best) with
>>>little icons too, perhaps, or underline them or whatever.  In HTML, the
>>>starting point of a link is always marked explicitly with SGML containment,
>>>so that applying a blue underline is easy, but in XML this isn't the case,
>>>and another mechanism will be needed.


>In a HyTime system that supports unrestricted independent (out-of-line)
>links, you would have a hypergrove that includes the groves for all the
>documents you know about (the "bounded object set" or BOS) as well as the
>HyTime semantic grove, which represents the result of applying HyTime
>processing semantics to the hypergrove.  Among other things, it reflects
>all the hyperlinks in the hyperdocument.  As it is a grove, you should be
>able to use DSSSL to query the grove and determine whether or not a given
>node in a document is also a member of any hyperlink anchors.

Certainly I can have a query-construction rule:

(query (hypergrove-anchors)
  (make link

where hypergrove-anchors is a query that finds me all the nodes in the
source grove that are hypertext anchors.  But that's not enough if I have
links into character data.  Suppose for example I have an anchor that's a
word that isn't a complete pseudo-element, and suppose I want to display
anchors by putting them in a box.  So I need a rule like

(query ???
  (make box))

The problem is that there is no single node in the source grove
corresponding to the anchor.  It's no good to query for each of the
characters in the word, because that would put each character in its own
box.  And it's no good querying for the node in the auxiliary grove, because
the purpose of the query construction rules is to identify the construction
rule to be used for each node in the grove that's being processed (the
source grove).

To deal with this, instead of calling process-children, I would have to call
a special function that recognized when an adjacent sequence of data
characters constituted an anchor and called some function with those
characters as an argument:

(default (process-children-with-anchors display-anchor))

(define (display-anchor nl)
  (make box
     (process-node-list nl)))

Not a pleasant prospect.


 DSSSList info and archive:

Current Thread