@src as subject

Here is a case where using @src as subject causes a problem:

	<img src="index.png" rel="index" href="index.html">INDEX</img>

The intention of this markup is that there is an image with the word IMAGE  
in a pretty font, and the image is a link to the index for the current  
document. If the src fails then you just get the word INDEX instead.

So the intended triple is

	<> <xhtml2:index> <index.html>

but the derived triple is

	<index.png> <xhtml2:index> <index.html>

which is clearly wrong.

If you add an about

	<img about="" src="index.png" rel="index" href="index.html">INDEX</img>

we would have to say that that @about overrides @src (which is different  
to how we deal with the other attributes).

The other option is to say that @src as subject only works for @property  
(just as href only works as object for rel and rev). Then we could have:

	<img src="index.png" rel="index" href="index.html"  
property="dc:title">INDEX</img>

	<> <xhtml2:index> <index.html>
	<index.png> <dc:title> "INDEX"

but is that obvious? And then you have to do something special (i.e.  
duplicate the URL) when you *do* want to apply a rel to a src:

	<img src="index.png" about="index.png" rel="dc:description"  
href="descr.html">INDEX</img>.

Swings and roundabouts methinks.

(We should be aware that there is a deliberate implication in XHTML2 that  
the resource at the end of a @src is equivalent in some way to the content  
of the element that the @src is attached to:

	<img src="map.png">Leave the station by the main exit, turn left, and  
we're on the left</img>

	<map.png> <xhtml2:canBeConsideredEquivalentTo> "Leave the station ..."

which is also true of

	<img src="sunset.jpg">Sunset in Nice</img>
)

Steven

Received on Tuesday, 17 January 2006 22:00:32 UTC