W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > June 2009

Re: Proposed test case 0126 (was Test for multiple values in @typeof)

From: Shane McCarron <shane@aptest.com>
Date: Mon, 01 Jun 2009 08:37:52 -0500
Message-ID: <4A23D9B0.4090305@aptest.com>
To: Mark Birbeck <mark.birbeck@webbackplane.com>
CC: RDFa <public-rdf-in-xhtml-tf@w3.org>
Okay - let's try this - the test is not as *simple* as I would like, but 
I think it is important to include an example that makes semantic sense 
so I have included the foaf name markup from test case 0124 as well:

HTML:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:sioc="http://rdfs.org/sioc/ns#"
      xmlns:foaf="http://xmlns.com/foaf/0.1/">
  <head>
    <title>Test 0126</title>
        <base href="http://www.example.org/me">
  </head>
  <body>
      <div id="mark" about="#mark" typeof="foaf:Person sioc:Post">
         <h2 property="foaf:name" datatype=""><span 
property="foaf:firstname">Mark</span><span 
property="foaf:surname">Birbeck</span></h2>
      </div>
  </body>
</html>

and SPARQL:

ASK WHERE {
<http://www.example.org/me#mark> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://xmlns.com/foaf/0.1/Person> .
<http://www.example.org/me#mark> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://rdfs.org/sioc/ns#Post> .
<http://www.example.org/me#mark> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://xmlns.com/foaf/0.1/name> .
<http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/firstName> 
"Mark" .
<http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/surname> 
"Birbeck" .
<http://www.example.org/me#mark> <http://xmlns.com/foaf/0.1/name> "Mark 
Birbeck" .
}



Mark Birbeck wrote:
> Hi Shane,
>
> For my testing I used foaf:Person and foaf:Agent:
>
>   <div about="#shane" typeof="foaf:Person foaf:Agent">
>     <h2 property="foaf:name" datatype="">
>       <span property="foaf:firstname">Shane</span>
>       <span property="foaf:surname">McCarron</span>
>     </h2>
>   </div>
>
> But I don't think it's a very good example, because a system that is
> able to infer new information can easily derive your foaf-agentness
> from your foaf-personness -- so you'd only really need to set
> @typeof="foaf:Person".
>
> I actually think the Drupal example itself was quite a good one,
> combing the type FOAF document (which is very broad), with the more
> specific type of SIOC post (which is a post that people can reply to).
>
> The real Drupal 7 pages have many properties, so the following does
> not follow its structure, but it's the same idea, and I believe it's
> still correct:
>
>   <div typeof="foaf:Document sioc:Post">
>     <h1 property="dc:title">My first blog post</h1>
>   </div>
>
> Regards,
>
> Mark
>
> On Mon, Jun 1, 2009 at 4:35 AM, Shane McCarron <shane@aptest.com> wrote:
>   
>> I tried something, but I think it is wrong semantically.  Someone smart
>> please suggest a better combination of types?
>>
>> <html xmlns:foaf="http://xmlns.com/foaf/0.1/">
>>  <head>
>>   <title>Test 0126</title>
>>       <base href="http://www.example.org/me">
>>  </head>
>>  <body>
>>     <div id="mark" about="#mark" typeof="foaf:Person foaf:name">Mark
>> Birbeck</div>
>>  </body>
>> </html>
>>
>> with a sparql of
>>
>> ASK WHERE {
>> <http://www.example.org/me#mark>
>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>> <http://xmlns.com/foaf/0.1/Person> .
>> <http://www.example.org/me#mark>
>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>> <http://xmlns.com/foaf/0.1/name> .
>> }
>>
>> and an annotation of:
>>
>>   <TestCase rdf:about="Test0126">
>>       <dc:contributor>Shane McCarron</dc:contributor>
>>       <dc:title>Multiple types for an object</dc:title>
>>       <informationResourceInput rdf:resource="0126.html"/>
>>       <informationResourceResults rdf:resource="0126.sparql"/>
>>       <purpose>Checks to ensure that multiple curies in a typeof are
>>               parser correctly.</purpose>
>>       <reviewStatus
>> rdf:resource="http://www.w3.org/2006/03/test-description#unreviewed"/>
>>       <specificationReference></specificationReference>
>>   </TestCase>
>>
>>
>> Mark Birbeck wrote:
>>     
>>> Hello all,
>>>
>>> In Drupal 7, each page will be marked up something like this:
>>>
>>>  <div typeof="foaf:Document sioc:Post" about="/d701/node/2#this">
>>>    ...
>>>  </div>
>>>
>>> My parser got this wrong, treating the two @typeof values as one
>>> string. As I started work on fixing this, I looked through the
>>> manifest for a unit-test to work against, and I couldn't find one.
>>>
>>> If Michael or someone knows that there is such a test, would they mind
>>> giving me the number? (Sorry to be a pain...)
>>>
>>> And if there is no such test at present, I think it might be worth adding
>>> one.
>>>
>>> Regards,
>>>
>>> Mark
>>>
>>>
>>>       
>> --
>> Shane P. McCarron                          Phone: +1 763 786-8160 x120
>> Managing Director                            Fax: +1 763 786-8180
>> ApTest Minnesota                            Inet: shane@aptest.com
>>
>>
>>
>>     
>
>
>
>   

-- 
Shane P. McCarron                          Phone: +1 763 786-8160 x120
Managing Director                            Fax: +1 763 786-8180
ApTest Minnesota                            Inet: shane@aptest.com
Received on Monday, 1 June 2009 13:38:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 1 June 2009 13:38:36 GMT