W3C home > Mailing lists > Public > www-rdf-comments@w3.org > April to June 2005

Re: Error in RDF/XML Syntax Specification?

From: Arjohn Kampman <arjohn.kampman@aduna.biz>
Date: Mon, 04 Apr 2005 16:24:15 +0200
Message-ID: <42514E0F.8090906@aduna.biz>
To: www-rdf-comments@w3.org
Cc: Dave Beckett <dave.beckett@bristol.ac.uk>

For those who had trouble grokking the cryptic report below (it appears
that I'm not very good at multi-tasking...): it describes a piece of
RDF/XML data containing a literal equivalent to ""^^xsd:string in
Turtle, which I thought was correct RDF/XML:

   <rdf:Description rdf:ID="ID1">
       <foo:prop rdf:datatype="http://www.w3.org/2001/XMLSchema#string"

However, Sesame's parser (Rio) reported an error on it saying the
'rdf:datatype' attribute is not allowed here. The RDF/XML spec seems to
agree with Sesame here, which is not what I had expected. Is this an
error in the spec?


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/

Aduna BV - http://aduna.biz/
Prinses Julianaplein 14-b, 3817 CS Amersfoort, The Netherlands
tel. +31-(0)33-4659987  fax. +31-(0)33-4659987
Received on Monday, 4 April 2005 14:24:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:05 UTC