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

Re: Error in RDF/XML Syntax Specification?

From: Graham Klyne <GK@ninebynine.org>
Date: Mon, 04 Apr 2005 14:13:29 +0100
Message-Id: <>
To: Arjohn Kampman <arjohn.kampman@aduna.biz>, www-rdf-comments@w3.org, Dave Beckett <dave.beckett@bristol.ac.uk>

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:

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



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"?>
>     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>
>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?
>[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:
Received on Monday, 4 April 2005 13:22:17 UTC

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