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

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

From: Grant Robertson <grantsr@gmail.com>
Date: Fri, 20 Apr 2012 06:31:15 -0700
To: "'Oskar Welzl'" <lists@welzl.info>, <public-rdfa@w3.org>
Message-ID: <9919E527F5984564A3D8C3DFDE92680E@grantdesk>

Oskar,

I don't have time to examine your code too closely right now, as I am
getting ready for work. However, you might want to double-check as to which
version of the spec your various processors are adhering to. The current
"official" spec is version 1.0 (http://www.w3.org/TR/rdfa-syntax). However
there is a candidate recommendation called RDFa 1.1 Core
(http://www.w3.org/TR/rdfa-core/), the major changes of which affect the
exact situation you have created in your code. You have no @rel or @rev or
@content or @datatype in that particular element. Therfore, under version
1.1 of the spec, you are in what I call "Special Property Mode" where
@property behaves more like @rel. Please take a look at the table I created
(http://lists.w3.org/Archives/Public/public-rdfa-wg/2012Apr/att-0013/RDFa_Su
bject-Object_Variables_Determination.pdf) to help figure out this new
processing model and see if it fits with one of the two alternative outputs
you are getting.

Please note that my table may not be 100% correct. I am working on figuring
out the spec myself.

Gotta go. Breakfast getting cold.
 
Grant S. Robertson
www.demml.org
www.ideationizing.com
 
-----------------------------------------
A country consists of its land and its people. Whomever fails to care for
both cannot consider themselves a patriot.
 

> -----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 13:31:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 20 April 2012 13:31:52 GMT