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

Re: Error in test or error in spec?

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Wed, 7 Mar 2012 20:07:30 -0500
To: Ivan Herman <ivan@w3.org>
CC: W3C RDFWA WG <public-rdfa-wg@w3.org>
Message-ID: <6838062D-D80F-4DE2-B3F3-3566F98DC1A1@kellogg-assoc.com>
There remains the other issue I pointed out in Step 5.1:

if a node has @about, @typeof and @property, I believe that the typed_resource should be on @about, but it doesn't seem that the text describes this:

[[[
new subject is set to the resource obtained from the first match from the following rule:
	 by using the resource from @about, if present, obtained according to the section onCURIE and IRI Processing;
	 otherwise, if the element is the root element of the document, then act as if there is an empty @about present, and process it according to the rule for @about, above;
	 otherwise, if parent object is present, new subject is set to the value of parent object.
If @typeof is present then typed resource is set to the resource obtained from the first match from the following rules:
	 by using the resource from @resource, if present, obtained according to the section onCURIE and IRI Processing;
	 otherwise, by using the IRI from @href, if present, obtained according to the section onCURIE and IRI Processing;
	 otherwise, by using the IRI from @src, if present, obtained according to the section onCURIE and IRI Processing;
	 otherwise, the value of typed resource is set to a newly created bnode.
	 The value of the current object resource is then set to the value of typed resource.
]]]

I think the "If @typeof" steps need to start with the following:

	 by using the resource from @about, if present, obtained according to the section onCURIE and IRI Processing;

I don't think we have a test for this, but consider the following:

<div about="#me" typeof="foaf:Person" property="foaf:name">Gregg Kellogg</div>

shouldn't this create the following?

<#me> a foaf:Person; foaf:name "Gregg Kellogg" .

As it reads now, I think it would create the following:

<#me> foaf:name "Gregg Kellogg" .
[ a foaf:Person ].

Gregg

On Mar 7, 2012, at 12:17 PM, Ivan Herman wrote:

> Gregg,
> 
> I am not on my machine right now, so I cannot really check things in details. But... the point is that the current behaviour is consistent with the pattern that we took from the various schema.org examples, ie 
> 
> <bla property="prop" typeof="sometype">...
> 
> which results in a blank node object for the @property which will also be chained. If we began to fiddle around with this depending on whether we have some hanging rels coming in to the element, essentially the blank node being suddenly the subject for @property instead of the object, that would be sooooo messy that I do not think we should go there. I would be of the opinion to stay where we are, the spec is o.k., and adapt our tests...
> 
> My two cents on a Wednesday evening...
> 
> Ivan
> 
> ---
> Ivan Herman
> Tel:+31 641044153
> http://www.ivan-herman.net
> 
> (Written on mobile, sorry for brevity and misspellings...)
> 
> 
> 
> On 7 Mar 2012, at 19:17, Gregg Kellogg <gregg@kellogg-assoc.com> wrote:
> 
>> On Mar 7, 2012, at 3:24 AM, Ivan Herman wrote:
>> 
>>> Small remarks...
>>> On Mar 7, 2012, at 11:11 , Ivan Herman wrote:
>>> 
>>>> This is what the CR phase is good for: reveal corner cases!
>>>> 
>>>> A simplified version of test #58 looks as follow (simplified, because in the original tests there were two, structurally identical foaf:Person statements, but it is unnecessary here):
>>> 
>>> Oops, sorry, I did not do any change after all:-)
>>> 
>>>> 
>>>> <div about="http://www.example.org/#ben" rel="foaf:knows">
>>>>   <p typeof="foaf:Person" property="foaf:name">Mark Birbeck</p>
>>>>   <p typeof="foaf:Person" property="foaf:name">Ivan Herman</p>
>>>> </div>
>>>> 
>>> 
>>> [snip]
>>> 
>>>> 
>>>> My conclusion for now: the test is wrong. We should redo altogether
>>> 
>>> To be more precise: we should do a new test for the RDFa 1.1 case and keep the old one for the RDFa 1.0 case!
>> 
>> I do see some code in my processor which is inconsistent with Step 5, I wonder if something went missing at some point?
>> 
>> 1) In 5.1, if @about defines a new subject, then @typeof should create a typed_resource based on that subject, and not a new BNode.
>> 2) My code skips step 5.1 if there are incomplete triples, which there are in this case, so I proceed to step 5.2, which creates new_subject as a new BNode, and sets typed_resource to that BNode.
>> 
>> I don't have access to the RDFa Core 1.1 CVS history, so I can't tell if this was something that was added and then lost in a subsequent edit. It seems to make sense that we would have considered the case where incomplete triples are created as having an effect on the treatment of @typeof creating a new BNode, or applying to the chained subject evidenced by the incomplete triples.
>> 
>> I can see that I explicitly added the check for incomplete triples on November 11th, just after we adopted the behavior; perhaps it was something we discussed but did not formalize? I admit to being somewhat fuzzy on the topic.
>> 
>> Basically, these are the steps my processor takes:
>> 
>> root>body>div Step 6: new_subject => <http://example.org/#ben>
>> root>body>div Step 10: incompletes => rels: foaf:knows
>> root>body>div>p[0] Step 5: new_subject => _:a (parent object), typed_resource => _:a
>> root>body>div>p[0] Step 7: typeof => foaf:Person => {_:a a foaf:Person .}
>> root>body>div>p[0] Step 11(1.1) => plain literal => {_:a foaf:name "Mark Birbeck"}
>> root>body>div>p[0] Step 12 => complete incompletes => {<http://example.org/#ben> foaf:knows _:a}
>> root>body>div>p[1] Step 5: new_subject => _:b
>> root>body>div>p[1] Step 7: typeof => foaf:Person => {_:b a foaf:Person .}
>> root>body>div>p[1] Step 11(1.1) => plain literal => {_:b foaf:name "Ivan Herman"}
>> root>body>div>p[1] Step 12 => complete incompletes => {<http://example.org/#ben> foaf:knows _:b}
>> 
>> which results in output that is more consistent with RDFa 1.0:
>> 
>> <http://www.example.org/#ben> foaf:knows
>>   [ a foaf:Person; foaf:name "Mark Birbeck"],
>>   [ a foaf:Person; foaf:name "Ivan Herman"] .
>> 
>> Gregg
>> 
>>> Ivan
>>> 
>>> 
>>> 
>>>> because, of course, with those values it looks weird and, I guess, the goal was to use it as a test for hanging rels:
>>>> 
>>>> <div about="http://www.example.org/#ben" rel="foaf:knows">
>>>>   <p typeof="foaf:Person"><span property="foaf:name">Mark Birbeck</span></p>
>>>>   <p typeof="foaf:Person"><span property="foaf:name">Ivan Herman</span></p>
>>>> </div>
>>>> 
>>>> which indeed results in 
>>>> 
>>>> @prefix foaf: <http://xmlns.com/foaf/0.1/> .
>>>> 
>>>> <http://www.example.org/#ben> foaf:knows [ a foaf:Person;
>>>>         foaf:name "Mark Birbeck" ],
>>>>     [ a foaf:Person;
>>>>         foaf:name "Ivan Herman" ] .
>>>> 
>>>> 
>>>> 
>>>> Thoughts?
>>>> 
>>>> Ivan
>>>> 
>>>> 
>>>> ----
>>>> Ivan Herman, W3C Semantic Web Activity Lead
>>>> Home: http://www.w3.org/People/Ivan/
>>>> mobile: +31-641044153
>>>> 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
>>> FOAF: http://www.ivan-herman.net/foaf.rdf
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
Received on Thursday, 8 March 2012 01:08:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:56 UTC