Re: [Proposal] ISSUE-42: How does RDFa deal with @src

Mark,

adding questions, instead of answering them:-)

Where does

<> xh:img <s> .

come from your example <img src="s" alt="alt">?

Do we have a rule that all XHTML elements that are used are somehow
reflected in the generated triplets with this special 'xh:' namespace? I
do not see a reason to do that implicitly.

Also, are we sure that

<s> rdfs:label "alt".

is the best representation for this? I am afraid of finding ourselves in
some endless discussion with, say, WAI people on the meaning of the
'alt' attribute; one could also say that

<s> rdfs:seeAlso "alt".

makes more sense in the way they are referring to "alt". Let alone your
choice of dc:description for longdesc; should we hardwire a specific
namespace into RDFa (ie, dc)?

I am a little bit afraid of adding 'extra' semantics to a number of
other xhtml attributes this way. If we do that, should we also assign an
explicit triplet to @title in an 'a' element? After all, that could also
be interpreted as an rdf:label... Where do we stop?

Obviously,

>  <div about="#me" class="foaf:Person">
>    <span property="foaf:name">Mark Birbeck</span>
>    <img rel="foaf:img" src="mark-birbeck.jpg" alt="Mugshot of Mark
> Birbeck" />
>  </div>
>
> which would yield:
>
>  <#me>
>    a foaf:Person;
>    foaf:name "Mark Birbeck";
>    foaf:img <mark-birbeck.jpg> .



makes a lot of sense and reusing the src attribute to denote the object
(or the subject with @rev) is probably a clear and good idea. I wonder
whether this is where we should stop...

Ivan


Mark Birbeck wrote:
> 
> The first point is that I think we should change the title of this
> issue to be more specific:
> 
>  "How does RDFa deal with img/@src"
> 
> This is because @src is not allowed 'everywhere' in HTML and XHTML 1.x
> in the same way that it is in XHTML 2, so we don't need to look at it
> generically. (I.e., there's probably not a lot that we're going to
> find in common between <script> and <img>.)
> 
> However, if people think changing an issue title mid-stream is wrong,
> then the other alternative is to mark issue 42 as one for the
> future--when we get to XHTML 2--and open a new issue for img/@src.
> 
> 
> INTERPRETATION OF HTML/XHTML
> 
> In keeping with the idea that the host language for RDFa may provide
> semantics independent of RDFa, then the first step in trying to
> resolve ISSUE 42 would be to ask what metadata we could derive form a
> 'vanilla' HTML document.
> 
> Given this mark-up:
> 
>  <img src="s" alt="alt" longdesc="desc">
> 
> we could say that we have an image, a label for the image, and a
> description:
> 
>  <>
>    xh:img <s> .
> 
>  <s>
>      rdfs:label "alt";
>      dc:description <desc> .
> 
> NOTE: @longdesc holds a URI, not text.
> 
> NOTE: In all of the following examples I include a value for @alt
> since that is best practice in HTML/XHTML mark-up for accessibility
> purposes. @longdesc however, is not regarded in the same way. So even
> though it's irrelevant from an RDFa point of view, I think we should
> keep that in any resulting documentation and samples.
> 
> A possible additional triple would be to add a 'type' of
> dcmitype:Image. I'm quite in favour of this, but some may think it
> best left to an inference layer. Comments please.
> 
> 
> ADDING RDFA
> 
> Once we've agreed on the semantic interpretations of existing mark-up
> patterns, we then need to look at how RDFa can be used to enhance
> them.
> 
> SPECIFYING A PREDICATE
> 
> The first use-case would be to use the image as the value of a
> predicate, for example in a FOAF description. The most obvious way to
> do this would be with @rel:
> 
>  <div about="#me" class="foaf:Person">
>    <span property="foaf:name">Mark Birbeck</span>
>    <img rel="foaf:img" src="mark-birbeck.jpg" alt="Mugshot of Mark
> Birbeck" />
>  </div>
> 
> which would yield:
> 
>  <>
>    xh:img  <mark-birbeck.jpg> .
> 
>  <#me>
>    a foaf:Person;
>    foaf:name "Mark Birbeck";
>    foaf:img <mark-birbeck.jpg> .
> 
>  <mark-birbeck.jpg>
>      rdfs:label "Mugshot of Mark Birbeck" .
> 
> NOTE: You could argue that the subject of the first triple is <#me>,
> rather than <>. In this context we can decide however we want it to
> be. Since the triple is mainly of use to systems that are trying to
> understand the structure of the document, as opposed to understanding
> the embedded semantics I prefer the approach I've put here, but it's
> not a big deal to change it.
> 
> 
> There are also situations where @rev would be useful. For example,
> some search results on Shuttr ;) coiuld look like this:
> 
>  <div about="#me" class="foaf:Person">
>    Some pictures in which <span property="foaf:name">Mark
> Birbeck</span> appears:
>    <img rev="foaf:depicts" src="xtech-2007-lunch.jpg" alt="People
> having lunch at XTech 2007" />
>    <img rev="foaf:depicts" src="www-2007-lunch.jpg" alt="People
> having lunch at WWW 2007" />
>    <img rev="foaf:depicts" src="tripping-over.jpg" alt="Some idiot
> falling over" />
>  </div>
> 
> SPECIFYING TYPE
> 
> Generally it is better to establish a relationship between an image
> and something else, by using a predicate like foaf:depiction,
> foaf:img, foaf:depicts, etc.. Then the fact that we are dealing with a
> foaf:Image falls out easily by inreference. However, there may be
> situations where all that is required is to indicate the _type_ of the
> resource, without the resource being in a relationship with anything
> else. If there are such use cases, then this could be done with
> @class, but there is a problem, as outlined below.
> 
> NOTE: This mark-up assumes that @class gives us rdf:type. Since this
> is not a resolved issue then the exact mechanism used to achieve the
> following might need to change to be drawn into line with the other
> resolution.
> 
> At first sight the following seems legitimate:
> 
>  <img src="a-spider.jpg" alt="A picture of a spider" class="foaf:Image" />
> 
> However, what if we extend it by placing @about on the element. Using
> indentation to show ownership, we could interpret the addition of
> @about as either this:
> 
>  <img
>    about="#me"
>    src="a-spider.jpg"
>      alt="A picture of a spider"
>      class="foaf:Image"
>  />
> 
> or this:
> 
>  <img
>    about="#me"
>      class="foaf:Image"
>    src="a-spider.jpg"
>      alt="A picture of a spider"
>  />
> 
> The second example seems wrong, but only because we know the meaning
> of "foaf:Image"; what if we had the following mark-up instead:
> 
>  <img
>    about="#me"
>      class="foaf:Person"
>    rel="foaf:depiction"
>      src="a-spider.jpg"
>        alt="A picture of a spider"
>  />
> 
> It now seems perfectly natural to attach @class to the @about.
> 
> So we have an issue, and that is, what does @class mean on an HTML image?
> 
> My feeling is that we should 'hard-code' the rule that @class applies
> to @src, even in the presence of an @about.
> 
> Regards,
> 
> Mark
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
URL: http://www.w3.org/People/Ivan/
PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Thursday, 21 June 2007 14:02:59 UTC