Re: comment on emptyPropertyElt

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