Re: Link-5: Extended Contextual Links

On Sun, 18 May 1997 05:39:03 -0400 (EDT) Tim Bray said:
>What we need to do, I think, is to say either that:
>(1) another locator as described above is required, or
>(2) any content of extended linking elements that is not a locator
>    element is to be treated as a resource.
>Comments?

(1) amounts to leaving the current spec unchanged; a legal form
of the example might be:

 <?XML version="1.0" rmd="internal" ?>
 <!DOCTYPE test [
  <!ATTLIST X XML-LINK NMTOKEN #FIXED "EXTENDED">
  <!ATTLIST L XML-LINK NMTOKEN #FIXED "LOCATOR">
  <!ATTLIST S ID       ID      #IMPLIED>
 ]>
 <test>
 Faced with a tight situation, Sakata found a
 <s id='T'>tesuji</s>.

 <X>
 <L ROLE="EG" LABEL="English translation"
    SHOW="NEW" HREF="/cgi-bin/xlate?term=tesuji" />
 <L ROLE="PIC" LABEL="Illustration"
    SHOW="EMBED"
    HREF="pix.xml#DESCENDENT(*,FIG,CAPTION,TESUJI)" />
 <L ROLE="CourseNotes" LABEL="Course Notes"
    HREF="notes.xml#ID(def-Tesuji)..DITTO,NEXT(3,P)" />
 <L ROLE="ToMove" LABEL="Jump to move in game record"
    SHOW="REPLACE" HREF="game.xml#Move127" />
 <L ROLE="term" LABEL="term in text"
    HREF="#ID(T)"/>
 </X>
 </test>

or

 <test>Faced with a tight situation, Sakata found a <X>
 <L ROLE="term" LABEL="term in text" HREF="#HERE">tesuji</l>
 <L ROLE="EG" LABEL="English translation"
    SHOW="NEW" HREF="/cgi-bin/xlate?term=tesuji" />
 ...
 </X>
 </test>

I think the first of these makes perfect sense -- the second one
does too, but it's a bit strained.  It does, however, have one
advantage over Tim's proposal (2) (and over the XML-link SIMPLE
form):  it provides an obvious and clear place for the role, label,
and behavior information which section 3.1 is associated with
each resource of each link.  (Our SIMPLE form, unlike the HTML A,
doesn't provide role information for the resource enclosed within
it; it should.)

When this first came up I thought about changing EXTENDED to allow
content of (#PCDATA | LOCATOR | SIMPLE)* -- since SIMPLE does have
the meaning of asserting a link, one of whose link ends is
enclosed.  But since SIMPLE doesn't have provision for the role
and label information, I no longer think that's a good idea -- and
SIMPLE is also documented as applying to two-ended links, which makes
no sense in the middle of an EXTENDED element.

So:  yes, if people think this example makes sense, then XML-link
should lose the arbitrary restrictions that mean only two-way
links can have, by definition, one of their resources as their
own location.

But now we need two forms of EXTENDED link, one whose location and
content have meaning, and one whose location is (as in the current
spec) guaranteed not significant.  Perhaps we should define

 <!ELEMENT resource  ANY >
 <!ATTLIST resource
           XML-link  CDATA   #FIXED "resource"
           role      CDATA   #IMPLIED
           title     CDATA   #IMPLIED  >
  <!--* possibly also add SHOW, ACTUATE, BEHAVIOR atts *-->

then we can say

 <!ELEMENT extended  (locator*, (resource, locator*)?) >

and say the location and contents of an EXTENDED link are a resource
if and only if it contains a RESOURCE element.  And then the
resource will have the appropriate attributes.

We should NOT simply say 'if there is content, then that content
is a resource', because even if there is no content, the EXTENDED
element has a location -- and the whole point is whether the location
of the EXTENDED element is significant or not.  We do not want
white-space variation to make EXTENDED pointers acquire and lose
resources every time the document is parsed by a different
processor.

We SHOULD fix the problem in SIMPLE links.

-C. M. Sperberg-McQueen

Received on Thursday, 22 May 1997 19:26:26 UTC