W3C home > Mailing lists > Public > www-rdf-comments@w3.org > October to December 2002

Re: comment on emptyPropertyElt

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Fri, 01 Nov 2002 12:41:55 +0000
To: "Peter F. Patel-Schneider" <pfps@research.bell-labs.com>
cc: www-rdf-comments@w3.org
Message-ID: <5533.1036154515@hoth.ilrt.bris.ac.uk>

>>>"Peter F. Patel-Schneider" said:
> 
> I just noticed that
> 
> ...
> 
> 	<rdf:Description rdf:about="foo">
> 	  <bar />
> 	</rdf:Description>
> 
> is valid RDF, and, moreover, gives rise to the following n-triple
> 
> 	foo bar "" .
> 
>  (or something like this - I don't know what language tag would be applied).

Yes, correct.

> I think that this is a terrible design decision.  It introduces yet another
> special case into the RDF grammar, as evidenced by the wording in 7.2.19

I agree the emptyPropertyElt is overloaded with special cases; that's
a consequence of all the abbreviations it tended to get.

> 7.2.19 Production emptyPropertyElt 
> 
> ...
> 
>     * If there are no attributes or only the optional rdf:ID attribute i
>       then o := literal(literal-value:="", literal-language := e.language)
>       ...
> 
> ...
> 
> 
> I suggest that this be made illegal syntax.  A construction like the above
> is probably a mistake, and should not be silently accepted.  Hallucinating
> a string here is a particularly bad idea.

The reason this is written this was is because how XML treats empty
elements.  In an XML infoset, you cannot distinguish

 	<rdf:Description rdf:about="foo">
 	  <bar></bar>
 	</rdf:Description>
from
 	<rdf:Description rdf:about="foo">
 	  <bar />
 	</rdf:Description>

using just the Infoitems.

In RDf/XML, the former assigns an empty literal to a property
and remains a requirement.

The latter does exactly the same.  I'm hoping we won't ever be using
the latter in examples, I've never seen it in any existing content
and all we can do is give advice - don't do it that way, it's ugly
and confusing.

Dave
Received on Friday, 1 November 2002 07:43:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 September 2012 14:16:31 GMT