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

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

From: Oskar Welzl <lists@welzl.info>
Date: Fri, 20 Apr 2012 14:34:45 +0200 (CEST)
To: public-rdfa@w3.org
Message-ID: <mtranet.20120420143445.425738994@ispservices.at>
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 12:34:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 20 April 2012 12:34:37 GMT