Hi Manu Yet another Manu test series:-) Thanks for these!
(B.t.w.: shouldn't all these cases end up in the test series? I think they should, because they reveal exactly those edge cases that might shake an implementation.)
Manu Sporny wrote:
Mark Birbeck wrote: That assumes that the 'current item' is something other than the image, and is defined elsewhere, like so: ------------------------ BIM Approach -------------------------------
:-) I like the name:-)
<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> . -----------------------------------------------------------------------
To be precise: as far as I can see the first would work with Mark's approach, too.
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> . -----------------------------------------------------------------------
That is correct.
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> . -----------------------------------------------------------------------
It is correct and I _do_ agree that the BIM approach looks a bit weird. Having said that (and I said that before): for _any_ RDFa constructions there will be use cases where, well, RDFa will look weird (witness the problems raised by DanBri in another thread). We cannot win all battles:-)
The important one, though, is how we apply rdf:type using @instanceof:
Yeah, that is the one that started a whole thread of discussions...
------------------------ 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 . -----------------------------------------------------------------------
Well... I believe that is not the case in Mark's approach. There are two cases: either we look at
http://www.w3.org/MarkUp/2008/ED-rdfa-syntax-20080103/ as it stands now, or include a change I actually proposed in http://www.w3.org/mid/[EMAIL PROTECTED] Let us analyse them separately.1. In the _current_, documented approach the [new subject] in <img> will be set to a new BNode by virtue of @instanceof, which has a higher priority than @src. Ie, we would get a
[] a foaf:Image; foaf:img <current-item.jpg> .2. However, I think Mark also agreed with my analysis that @src should move up the hierarchy. So look at
http://www.w3.org/MarkUp/2008/ED-rdfa-syntax-20080103/with the difference that in step 2/3 @src handling must appear right after @about. That means that [new subject] will be set to <current-item.jpg>. That will then be used for typing, ie, we will indeed get
<current-item.jpg> a foaf:Image .However, because @src is also kept to play a similar role to @resource/@href (in step 5 of the processing rules), @src is also used to establish the value of [current object resource], we will also get the weird triple:
<current-item.jpg> foaf:img <current-item.jpg>. Unless I misread the syntax document, that case is definitely problematic...A way to amend that in Mark's model would be the extra rule somewhere which says that if @resource, @href, or @src is used to set the value of [new subject] then it must be taken of the equation. But, well, what this would mean is that <img> will end up with a hanging rel, namely
<current-item.jpg> foaf:img ??? .but this hanging rel will be never resolved, because <img> does not have any children.
Indeed, the BIM version, though a bit weird due to the presence of @resource, works, because @src is taken out of the process in setting the [current object resource] (not in the current syntax document but, I believe, the way it should be in the BIM model).
IvanP.S. (I _hate_ to say that, but this was always my use case on introducing @trel and @trev instead of a single @instanceof:-(. It is indeed the presence and the behaviour of @instanceof that messes up things here. However, the current BIM model with the @src behaviour seems to be a fair compromise after all...)
Does that seem to be everybody's understanding of the differences between BIM/Mark with regards to @src? -- manu
-- Ivan Herman, W3C Semantic Web Activity Lead Home: http://www.w3.org/People/Ivan/ PGP Key: http://www.ivan-herman.net/pgpkey.html FOAF: http://www.ivan-herman.net/foaf.rdf
smime.p7s
Description: S/MIME Cryptographic Signature