Re: comment on emptyPropertyElt

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Subject: Re: comment on emptyPropertyElt 
Date: Fri, 01 Nov 2002 12:41:55 +0000

> >>>"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

Several OWL example documents have (soon to be had) things like the latter
example.  They were of course mistakes, but did parse as valid RDF.

peter

Received on Friday, 1 November 2002 08:33:16 UTC