Re: CodeZoo DOAP

From: Ryan Lee <ryanlee_at_w3.org>
Date: Sat, 10 Dec 2005 22:38:26 -0500

Oliver Cole wrote:
> On Sat, 2005-12-10 at 19:55 -0500, David Huynh wrote:
>> The validator here
>> http://www.w3.org/RDF/Validator/
>> says that that DOAP resource validates successfully but it contains no
>> triple. This is actually curious-- The <RDF> tag that's supposed to
>> enclose the RDF content was made optional since 2004, and that validator
>> mentions such is the case with many DOAP files...
>>
>> David
>
> Well... I imagine you are more qualfied to tell W3 their validator is
> broken than I am.

For http://www.codezoo.com/cs/user/run/component/5574?x-r=doap

I believe the validator is correct; if you validate with the option 'RDF
is NOT enclosed...,' you'll note it claims the error is on line 21.
That region looks like (minus the email address):

17: <doap:maintainer>
18: <foaf:Person>
19: <foaf:name>bob mcwhirter</foaf:name>
20: </foaf:Person>
21: <foaf:Person>
22: <foaf:name>James Strachan</foaf:name>
23: <foaf:mbox rdf:resource="[cut]"/>
24: </foaf:Person>
25: <foaf:Person>
26: <foaf:name>John Keyes</foaf:name>
27: </foaf:Person>
28: </doap:maintainer>

Each of these needs to be a separate property-object pair. Right now
it's a property with three objects, which is incorrect syntax. Correct
syntax could look like:

17: <doap:maintainer>
18: <foaf:Person>
19: <foaf:name>bob mcwhirter</foaf:name>
20: </foaf:Person>
21: </doap:maintainer>
22: <doap:maintainer>
23: <foaf:Person>
24: <foaf:name>James Strachan</foaf:name>
25: <foaf:mbox rdf:resource="[cut]"/>
26: </foaf:Person>
27: </doap:maintainer>
28: <doap:maintainer>
29: <foaf:Person>
30: <foaf:name>John Keyes</foaf:name>
31: </foaf:Person>
32: </doap:maintainer>

If the validator warnings are too arcane, one way to think about RDF/XML
is striping. If each XML element is on its own line, then every other
line should be a resource/literal, and the other half of alternating
lines should be properties, generally speaking; not every graph will fit
this pattern.

http://www.w3.org/TR/rdf-syntax-grammar/#example1
http://www.w3.org/2001/10/stripes/

-- 
Ryan Lee                 ryanlee_at_w3.org
W3C Research Engineer    +1.617.253.5327
http://simile.mit.edu/
Received on Sun Dec 11 2005 - 03:31:53 EST

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:39:18 EDT