W3C home > Mailing lists > Public > semantic-web@w3.org > August 2007

Re: ambiguity in RDF/XML bnode short form?

From: Dave Beckett <dave@dajobe.org>
Date: Sun, 26 Aug 2007 16:16:39 -0700
Message-ID: <46D209D7.3090806@dajobe.org>
To: Garret Wilson <garret@globalmentor.com>
CC: Semantic Web <semantic-web@w3.org>

Garret Wilson wrote:
> 
> I'm reading
> http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-property-attributes-on-property-element
> , which says that instead of,
> 
> <rdf:Description>
>  <ex:editor>
>    <rdf:Description ex:fullName="Dave Beckett" />
>  </ex:editor>
> </rdf:Description>
> 
> I can use,
> 
> <rdf:Description>
>  <ex:editor ex:fullName="Dave Beckett" />
> </rdf:Description>

Yes.  But try to avoid property attributes, since amongst
other things, it means you cannot have different languages
for literals, and you can't have xml literals.

> There seems to be no qualification that the bnode object must have at
> least one property. From the text, then, I should be able to replace,
> 
> <rdf:Description>
>  <ex:editor>
>    <rdf:Description/>
>  </ex:editor>
> </rdf:Description>
> 
> with
> 
> <rdf:Description>
>  <ex:editor/>
> </rdf:Description>

No, the meaning is different.  The former has a blank node object,
the latter has an empty string value, same as your next example:

> This is ambiguous with the same syntax for a plain literal object, as
> the following produces an identical info set:
> 
> <rdf:Description>
>  <ex:editor></ex:editor>
> </rdf:Description>
> 
> What am I missing here? Shouldn't there be a qualification at
> http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-property-attributes-on-property-element
> that restricts the short form to bnodes with at least one property?
> 
> ("If all of the property elements on a blank node element..." doesn't
> seem to be sufficient qualification, as "all of" applies to zero
> instances just as well as to 20 instances.)

Yes it is ambiguous in the examples (section 2), but not in the formal
description (sections 6 and 7), specifically:
  http://www.w3.org/TR/rdf-syntax-grammar/#emptyPropertyElt
The latter wins in case of disagreements,
so it's not strictly wrong. But it should be mentioned in an errata.

Basically, my advice is do not over abbreviate rdf/xml.  Avoid
property attributes as well as things like the above.  It's
just confusing.

RDF/XML is a design from 1998/1999 and it's requirements then
are a lot different from formats of today.

Dave
Received on Sunday, 26 August 2007 23:17:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:17 GMT