- From: Ivan Herman <ivan@w3.org>
- Date: Wed, 2 Nov 2011 11:03:41 +0100
- To: Gregg Kellogg <gregg@kellogg-assoc.com>
- Cc: W3C RDFWA WG <public-rdfa-wg@w3.org>, Péter Mika <pmika@yahoo-inc.com>
- Message-Id: <357F08C3-D3F3-4C29-88BC-BFDFA3756451@w3.org>
On Nov 1, 2011, at 19:35 , Gregg Kellogg wrote: > On Nov 1, 2011, at 6:06 AM, Ivan Herman wrote: > >> Gregg, >> >> I just try to go down the line of concentrating on @typeof; maybe that reaches the same goal as what we wanted, but makes a change in RDFa that might be, possibly, cleaner. This is not fully worked out yet... >> >> Let us consider changing the behaviour of @typeof such that: >> >> 1. if (@rel/@rev is present, but no @resource/@href/@src) or >> (@property is present, @rel/@rev is not, and no @resource/@href/@src) >> then >> - @typeof creates a blank node >> - that blank node is the current_object (ie, the one going down the chain) >> - is the subject of the type triples >> 2. if @resource/@href/@src is present _as well as_ @typeof, then no blank node is generated, and the subject of the type triples is the IRI resource of @resource/@href/@src >> >> Both of these rules are different than what we have now; all other rules for @typeof remain unchanged. The advantage is that there is no difference between @rel/@rev on the one hand and @property on the other hand with respect to @typeof. Of course, what I called the 'minimalist' change for @property, as you described on the wiki, remains valid, too. > > I think we break a lot if <div about="foo" typeof="Bar"/> does not assign the type to <foo>. However, saying <div typeof="Bar"/> or <div typeof="Bar" resource="baz"/> assigning the type to the object would be interesting. As I said: the rules above are an addition to the current rules, and they are silent in cases there is no @rel/@rev. What this means is that in all three examples the current rules apply: <div about="foo" typeof="Bar"/> sets the type for 'foo', which will be the subject down the line <div typeof="Bar"> creates a new bnode of type 'Bar', which will be the subject down the line <div typeof="bar" resource="baz"> will set the type for baz and that will be the subject down the line. > >> What we get is: >> >> <div about="relV" rel="t:foo" typeof="t:Bar"><span property="t:yip">Yes</span></div> >> => >> <relV> t:foo [ a t:Bar; >> t:yip "Yes" ] . > > With my interpretation, presuming that @rel/@rev change to reference _new object_ and not _new subject_, and this would create the following: > > <> t:foo <relV> . > <relV> a t:Bar; t:yip "Yes" . Yes, indeed. You offer an equal interpretation to @about and @typeof in this respect, whereas I only touch at @typeof. My approach was to find the minimal set of changes that would cover a large number of use cases. I am not convinced that mixing in @about into the equation makes sense. I also must admit that @rel applying to @about in terms of object is counterintuitive for me. @about should be, essentially, on the subject (as the name of the attribute also suggests) and @resource (or @href) is the intuitive attribute for an object. But that may be only me. > > If @rel retained it's current interpretation, there would be no resource for @rel to operate on, and it would do the following: > > <relV> a t:Bar; t:yip "Yes" . > >> <div about="relP" property="t:foo" typeof="t:Bar"><span property="t:yip">Yes</span></div> >> => >> <relP> t:foo [ a t:Bar; >> t:yip "Yes" ] . > > This should be consistent with the first interpretation above: > > <> t:foo <relV> . > <relV> a t:Bar; t:yip "Yes" . I guess what you say that there should be consistency between @rel and @property. I agree. So if the behaviour of @about is also changed, that this should also change, but I think what I describe _is_ consistent... > >> Both by virtue of #1 above. The reason for the #2 rule above is that if I have >> >> <div about="relV2" rel="t:foo" typeof="t:Bar" href="http://example.org"> >> >> Our current rules would assign a type to <relV2>, but this is really not consistent with the fact that, without @href, the typing goes to the 'right hand' of @rel, so to say. With that modification, what we get is: >> >> <div about="relV2" rel="t:foo" typeof="t:Bar" href="http://example.org"> >> <span property="t:yip">Yes</span> >> </div> >> => >> <relV2> t:foo <http://example.org> . >> <http://example.org> a t:Bar; >> t:yip "Yes" . >> >> <div about="relP2" property="t:foo" href="http://example2.org" typeof="t:Bar"> >> <span property="t:yip">Yes</span> >> </div> >> => >> <relP2> t:foo <http://example2.org> . >> <http://example2.org> a t:Bar; >> t:yip "Yes" . >> >> Thoughts? > > I would favor @typeof binding to either @about or @resource/@href/..., but not both. On it's own, having @typeof describe the type of the newly created object makes most sense to me, if we decide that some change is necessary. Well... what you propose would destroy the <div about="..." typeof="..."/> idiom although, in the absence of @rel or @property this would be intuitive for me... Ivan > > Similarly, binding @rel and @property to the object, rather than the subject, produces what I believe to be the most sensible results, but does create a compatibility issue for @rel, which is why I only suggested it for @property. > > My proposal had @property bind to _parent subject_ instead of _new subject_, but if we make these changes, I would support binding it to _new object_, so that the recommended pattern would be: > > <div property="t:foo" typeof="t:Bar href="http://example2.org"><span property="t:yip">Yes<?span></div> > > which would create > > <> t:foo [ a t:Bar; t:yip "Yes" ] . > > @href without an @typeof would not create a new object. > > Gregg > >> Ivan >> >> >> >> ---- >> Ivan Herman, W3C Semantic Web Activity Lead >> Home: http://www.w3.org/People/Ivan/ >> mobile: +31-641044153 >> PGP Key: http://www.ivan-herman.net/pgpkey.html >> FOAF: http://www.ivan-herman.net/foaf.rdf >> >> >> >> >> > > ---- Ivan Herman, W3C Semantic Web Activity Lead Home: http://www.w3.org/People/Ivan/ mobile: +31-641044153 PGP Key: http://www.ivan-herman.net/pgpkey.html FOAF: http://www.ivan-herman.net/foaf.rdf
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Wednesday, 2 November 2011 10:01:42 UTC