W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > January 2008

Re: Rethinking @src in the context of chaining rules

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Tue, 08 Jan 2008 15:17:07 -0500
Message-ID: <4783DA43.20808@digitalbazaar.com>
To: RDFa <public-rdf-in-xhtml-tf@w3.org>

Mark Birbeck wrote:
>> -----------------------------------------------------------------------
>> <img src="me.jpg" instanceof="foaf:Image" rev="foaf:img"
>>      resource="#me" />
>> --------
>> <#me> foaf:img <me.jpg> .
>> <me.jpg> rdf:type foaf:Image .
>> -----------------------------------------------------------------------
> 
> If @src is equivalent to @about then yes, this works. It's a clever
> trick, and one I considered, but I'm not really keen on it, since to
> me the first relationship we'd want to talk about would be that
> between the 'current item' and the image:
> 
>   <img rel="foaf:img" src="me.jpg" />

Right, agreed, we do want to talk about the relationship between the
'current item' and the image.

That assumes that the 'current item' is something other than the image,
and is defined elsewhere, like so:

------------------------ BIM Approach -------------------------------
<span about="#current-item" rel="foaf:img">
   ...
   <img src="current-item.jpg" />
   ...
</span>
------------------------ Mark Approach -------------------------------
<span about="#current-item">
   ...
   <img rel="foaf:img" src="current-item.jpg" />
   ...
</span>
----------
<#current-item> foaf:img <current-item.jpg> .
-----------------------------------------------------------------------

If an image is floating on a page, by itself, then we can't link it like
we did above:

------------------------ BIM Approach -------------------------------
<img src="current-item.jpg" rev="foaf:img" resource="#current-item"/>
------------------------ Mark Approach -------------------------------
<img about="#current-item" rel="foaf:img" src="current-item.jpg" />
----------
<#current-item> foaf:img <current-item.jpg> .
-----------------------------------------------------------------------

or you could do like it like this (Note how nice Mark's markup looks,
the BIM markup looks wierd):

------------------------ BIM Approach -------------------------------
<span about="#current-item">
   <span property="dc:title">A Picture of Me</span>
   <span property="dc:name">Me</span>
   <img src="current-item.jpg" rev="foaf:img" resource="#current-item"/>
</span>
------------------------ Mark Approach -------------------------------
<span about="#current-item">
   <span property="dc:title">A Picture of Me</span>
   <span property="dc:name">Me</span>
   <img rel="foaf:img" src="current-item.jpg" />
</span>
----------
<#current-item> dc:title "A Picture of Me" .
<#current-item> dc:name "Me" .
<#current-item> foaf:img <current-item.jpg> .
-----------------------------------------------------------------------

The important one, though, is how we apply rdf:type using @instanceof:

------------------------ BIM Approach -------------------------------
<span about="#current-item">
   <span property="dc:title">A Picture of Me</span>
   <span property="dc:name">Me</span>
   <img src="current-item.jpg" instanceof="foaf:Image" rev="foaf:img"
        resource="#current-item"/>
</span>
------------------------ Mark Approach -------------------------------
<span about="#current-item">
   <span property="dc:title">A Picture of Me</span>
   <span property="dc:name">Me</span>
   <img rel="foaf:img" instanceof="foaf:Image" src="current-item.jpg" />
</span>
----------
<#current-item> dc:title "A Picture of Me" .
<#current-item> dc:name "Me" .
<#current-item> foaf:img <current-item.jpg> .
<current-item.jpg> rdf:type foaf:Image .
-----------------------------------------------------------------------

Does that seem to be everybody's understanding of the differences
between BIM/Mark with regards to @src?

-- manu

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: Intro to the Semantic Web in 6 minutes (video)
http://blog.digitalbazaar.com/2007/12/26/semantic-web-intro
Received on Tuesday, 8 January 2008 20:17:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 20:17:19 GMT