Error in RDF/XML Syntax Specification?

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/

Received on Friday, 1 April 2005 13:22:44 UTC