Re: Error in RDF/XML Syntax Specification?

I tried this test case in my RDF/XML parser, which is written in Haskell 
based very closely on the RDF/XML syntax specification document, and my 
parser also rejects this test case as being ill-formed:

[[
RDF.Harp.RDFXMLParserTest> t16
### Failure:
testValidMisc16:

match fails or Unexpected attributes on property Element foo:prop: 
Attribute rdf:datatype='http://www.w3.org/2001/XMLSchema#string' (file 
test20050404.rdf)
Cases: 1  Tried: 1  Errors: 0  Failures: 1

RDF.Harp.RDFXMLParserTest>
]]

#g
--

At 15:22 01/04/05 +0200, Arjohn Kampman wrote:


>Hi Dave, others,
>
>Someone posted a bug report on the Sesame forum for what he thought was
>an error in Sesame's RDF/XML parser[1]. I had a closer look at the
>RDF/XML syntax specification[2] and it appears that Sesame strictly
>adheres to this spec. This, however, surprised me, as I would have
>expected the data to be correct. Also, the W3C Validation Service[3] did
>parse the data as expected.
>
>The problematic data contains a datatyped (xsd:string) empty literal:
>
><?xml version="1.0"?>
><rdf:RDF
>     xmlns="foo:bar#"
>     xmlns:foo="foo:bar#"
>     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>     xml:base="foo:bar">
>
><rdf:Description rdf:ID="ID1">
>         <foo:prop rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>         ></foo:prop>
></rdf:Description>
></rdf:RDF>
>
>If my understanding of the grammar in the spec is correct, then this
>data matches the 'emptyPropertyElt' rule, which does not allow the
>rdf:datatype attribute to be specified. This is not what I was
>expecting. Also, the grammar doesn't seem to allow the serialization of
>an empty xsd:string object in RDF/XML.
>
>So, what I would like to know is: is this a bug in the spec and Sesame,
>or is it a problem with ARP and the validation service?
>
>Regards,
>
>Arjohn
>
>
>[1] http://www.openrdf.org/forum/mvnforum/viewthread?thread=525
>[2] http://www.w3.org/TR/rdf-syntax-grammar/
>[3] http://www.w3.org/RDF/Validator/

------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact

Received on Monday, 4 April 2005 13:22:17 UTC