W3C home > Mailing lists > Public > public-rdfa@w3.org > April 2012

Re: Subject/Object Confusion With @property, @resource And @typeof

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Fri, 20 Apr 2012 12:03:10 -0400
To: Oskar Welzl <lists@welzl.info>
CC: "grantsr@gmail.com" <grantsr@gmail.com>, "public-rdfa@w3.org" <public-rdfa@w3.org>
Message-ID: <D89F7BF4-AD45-4A44-BE12-5348A8746011@greggkellogg.net>
On Apr 20, 2012, at 8:55 AM, Oskar Welzl wrote:

> Thank you, Grant! 
>> However, you might want to double-check as to which
>> version of the spec your various processors are adhering to. 
>> ...  the major changes of which affect the
>> exact situation you have created in your code. 
> Aaaahh... so I found the one hidden trap, right? That's so me. 
> In fact, the markup started as 1.0 and then moved to 1.1 only because
> wanted to check if 1.1. Lite would be enough to express everything I
> already had. Since my focus was on "Lite" rather than on "1.1", I must
> have missed this when I kept re-arranging later, thus breaking
> compatibility with 1.0 at some point.
> One of the tools that give unexpected results is most certainly for 1.0
> only; it didn't understand @vocab und @prefix and made me insert xmlns
> temporarily again.
> The other one, though, at http://linter.structured-data.org uses 1.1 in
> its own examples, so I do assume it targets 1.1 markup. (It doesn't say
> so, though.) That part of the puzzle remains unsolved.

The linter needs to be updated; it's pretty close to the current RDFa 1.1 spec, but a couple of commits back. I'll update it in a week or so. In the mean time, the distiller at http://rdf.greggkellogg.net/distiller uses the same code, but more up to date; you should get good results from that.

Also, pretty much all of the tools listed at http://rdfa.info/tools/ conforms to RDFa 1.1 pretty well.


> Oh, and about your chart: It's great, I had seen it the night before
> when I browsed the -wg list. Tables are such much better for
> comprehension. The reason why it didn't help me much at that point was
> that 
> a) my markup was still different then (there was no parent with RDFa in
> it) and
> b) I didn't understand the meaning of "New Subject" in this context. I
> thought it would mean "Always discard current subject, set new one
> according to these rules". As I now read it, it means "Set new subject
> only if one of these rules applies."
> This left me in a situation were I tried to figure out which "new
> subject" to choose when none was to be set.
>> Gotta go. Breakfast getting cold.
> Hope it didn't.
> Thank you very much, I think it's clear now (except for the behaviour of
> the Structured Data Linter).
> Oskar
>>> -----Original Message-----
>>> From: Oskar Welzl [mailto:lists@welzl.info] 
>>> Sent: Friday, April 20, 2012 5:35 AM
>>> To: public-rdfa@w3.org
>>> Subject: Subject/Object Confusion With @property, @resource 
>>> And @typeof
>>> Hi,
>>> I'm getting confused about what's subject and what's object 
>>> when all three of @property, @resource and @typeof are used 
>>> on the same element. The confusion started only when I 
>>> realized that some tools behave differently from others here. 
>>> Reading the spec doesn't help me much. So what I'd like to 
>>> get is a clear answer on what's the correct interpretation; 
>>> which tools are 'right'.
>>> The markup I have is
>>> <div property="accountablePerson editor" 
>>> resource="http://www.welzl.info/id/oskar.welzl"  
>>> typeof="Person"> in the following context (vocab set to schema.org):
>>> <div  resource="http://rdfa.twoday.net/" typeof="Blog">
>>> 	<!-- THIS IS THE LINE -->
>>> 	<div property="accountablePerson editor" 
>>> resource="http://www.welzl.info/id/oskar.welzl"  typeof="Person">
>>> 		<p>Für den Inhalt verantwortlich:</p>
>>> 		<p>
>>> 		<span property="name">Oskar Welzl</span>, <span 
>>> property="workLocation" typeof="Place" ><span 
>>> property="name">Wien</span></span>
>>> 		</p>
>>> 	</div>
>>> </div>
>>> This was meant to be read as
>>> <http://rdfa.twoday.net/> a schema:Blog;
>>>   schema:accountablePerson <http://www.welzl.info/id/oskar.welzl>;
>>>   schema:editor <http://www.welzl.info/id/oskar.welzl> .
>>> <http://www.welzl.info/id/oskar.welzl> a schema:Person;
>>>   schema:name "Oskar Welzl";
>>>   schema:workLocation [ a schema:Place;
>>>     schema:name "Wien"] .
>>> Ruby and Python RDFa distillers give me exactly that. The 
>>> @property uses @resource as its object, @typeof types this 
>>> resource/object. Subject's taken from the parent.
>>> But when I run this through other tools, for example the The 
>>> Structured Data Linter, the example above translates to this:
>>> -
>>> rdf:type 	schema:Blog
>>> -
>>> rdf:type 	http://schema.org/Person
>>> http://schema.org/accountablePerson 	Für den Inhalt 
>>> verantwortlich: Oskar Welzl, Wien
>>> http://schema.org/editor 	Für den Inhalt verantwortlich: 
>>> Oskar Welzl, Wien
>>> http://schema.org/name 	Oskar Welzl
>>> -
>>> rdf:type 	http://schema.org/Place
>>> http://schema.org/name 	Wien
>>> http://schema.org/workLocation 	Wien
>>> -
>>> Now here the typed resource turns into the subject for the 
>>> @property given on the same element. Because of this, 
>>> @property no longer has a @resource that can act as the 
>>> object of the statement... and takes the whole text as its 
>>> value, which isn't intended either.
>>> I would have accepted this as an error in one tool, but I 
>>> also found other tools reading the statements in the same 
>>> manner. (It seems to happen that whenever @typeof is used, 
>>> the typed node is treated as the subject for the current statement.)
>>> Now what's right? 
>>> Thanks,
>>> Oskar
Received on Friday, 20 April 2012 16:06:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:48 UTC