W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > August 2001

RDF/XML Syntax - reifying using XML attributes only

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Tue, 21 Aug 2001 16:21:18 +0100
To: w3c-rdfcore-wg@w3.org
Message-ID: <4665.998407278@tatooine.ilrt.bris.ac.uk>
I thought of this test case while talking to Jan Grant, and having
chatted with it off-list with some of the syntax-ers (Art, Jan,
Jeremy), we feel this is broken but had no consensus on fixing it.

Pretty clearly when rdf:type is used as a property attribute, it is
defined to take a resource as a value (this is in the grammar).  What
is not so clear is when the other rdf: properties are used.
rdf:subject and rdf:predicate (unless RDF Schema ranges are used)
take a URI as value and this is OK.  rdf:object as an attribute can
take literal or URI, and we can't tell them apart as attribute

One interpretation would be that only literals are allowed as objects
in this form in which case the RDF/XML attached below reifies the
single statement
  <http://example.com/resource1> <http://example.com/predicate> "literal" .
into the attached N-Triples.

The various parsers do different things on this RDF/XML - which is
wrong - so we must define one way or forbid it.

The attribute forms are only abbreviations of the more expressive
element form so there need not be a way to provide literal and URIs
for rdf:object statement values.

I guess this is another syntax issue.  Brian - please record it and I
guess since I raised it, it belongs to me :(


<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!-- Test reified statement using attributes only -->
  <rdf:Description rdf:type="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"
                   rdf:object="literal" />

_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement> .
_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://example.com/resource> .
_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://example.com/predicate> .
_:id1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> "literal" .
Received on Tuesday, 21 August 2001 11:21:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:03 UTC