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

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

From: Oskar Welzl <lists@welzl.info>
Date: Fri, 20 Apr 2012 17:55:15 +0200
Message-ID: <1334937315.4271.23.camel@jupiter.hormayrgasse>
To: grantsr@gmail.com
Cc: public-rdfa@w3.org
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.

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 15:55:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 20 April 2012 15:55:46 GMT