Re: two failings of XLink

Elliotte Rusty Harold wrote:

>Consider this example:

<object xmlns:xlink="http://www.w3.org/TR/1999/xlink">
   <longdesc xlink:href="http://www.example.com"/>
   <src xlink:href="http://www.example.org"/>
   <someotherlink xlink:href="http://www.example.net"/>
   Look Mom! We can put alternate text here!
   We can even <strong>markup</strong> the alternate text.
   Hell, we can even provide a classic HTML
   <img src="http://www.example.org"/> for browsers that don't support
   XHTML2. I learned this trick from Java.
</object>

For discussion purposes, let's agree that this represents XHTML 2.0,
modified to use XLink 1.0. There's been plenty of confusion on just what is
necessary for authors to use XLink. Let's apply process of elimination
analysis on the example code.

>This [object] element has *3* links.

Elimination 1: No, the object element as written has zero links. Just
renaming attributes to 'xlink:href' does not an XLink make, not even a
simple XLink, at least in XLink 1.0.

So let's agree that either there is a DTD or Schema present to provide
default attributes (which would be a significant change to XHTML), or that
the hypothetical spec under discussion does some hand-waving to the same
effect.

The default attributes added could be either simple or extended. Let's look
at both.

Elimination 2: Simple XLink. If the DTD provided xlink:type="simple"
defaults on the first three child elements, this would, in XLink 1.0 terms,
define three separate, unrelated links:
<longdesc> -> http://www.example.com
<src> -> http://www.example.org
<someotherlink> -> http://www.example.net
And still, none of the links consider, in XLink 1.0 terms, <object> to be
involved.

It would be disrespectful to XLink, IMHO, to bless such an incorrect usage
pattern. A mythical generic XLink processor (say a link harvester, or a
stylesheet, or a spider) would be totally misled into believing that there
were three unrelated links, when this is really a single link with multiple
ends.

What we really want is something like this image from the XLink spec: (which
shows five remote resources instead of three, but is otherwise exactly what
we wish to model) http://www.w3.org/TR/xlink/extended-inl.gif

Elimination 3: Extended XLink. If the DTD provided an xlink:type="extended"
attribute on <object>, as well as xlink:type="locator" attributes on the
first three child elements, this could be considered an Extended XLink.

But what is it linking? Well, there are three participating endpoints, all
remote. So once again, the <object> element is not, in XLink 1.0 terms, part
of the link. Further, due to the absence of xlink:type="arc" elements,
default arcing kicks in and there are a total of six arcs present: to and
from every endpoint. That's a great feature for linkbases, but unfortunately
not what we were trying to do.

So at the syntax level, even more complexity that what the example shows
would be needed to make XLink 1.0 work with XHTML 2. And we haven't even
crossed threads with the architectural problems that will occur once this
kind of XHTML tries to combine with other languages...

For completeness, I should say that HLink also isn't up to the job of making
the example code work properly.

So, can we agree that there's more work to do and move on?

Thanks,

.micah

Received on Friday, 27 September 2002 02:08:57 UTC