W3C home > Mailing lists > Public > www-rdf-comments@w3.org > July to September 1999

Can properties have no value?

From: Perry A. Caro <caro@Adobe.COM>
Date: Mon, 02 Aug 1999 14:13:44 -0700
Message-ID: <37A60A08.3AC2CD3C@corp.adobe.com>
To: rdf-dev@mailbase.ac.uk
CC: www-rdf-comments@w3.org
Can a property have no value?  Based on the following production in the
formal grammar BNF:

[6.12] propertyElt  :== // fourth alternative:
			'<' propName idRefAttr? bagIdAttr? propAttr* '/>'

... a completely empty XML element (no attributes, no children) looks like a
valid property.  But what does it mean?  When I give the following to
SiRPAC:

1: <?xml version="1.0"?>
2: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3:          xmlns:test="test#">
4:   <rdf:Description about="http://www.w3.org/RDF/Implementations/SiRPAC/">
5:     <test:noValue/>
6:   </rdf:Description>
7: </rdf:RDF>

I get a valid triple:

triple('test#noValue',
       'http://www.w3.org/RDF/Implementations/SiRPAC/',
       'online#genid2').

But what is the value?  Is it a made-up literal?  A made-up resource?

This gets even more confusing when I switch to the abbreviated form:

1: <?xml version="1.0"?>
2: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
3:          xmlns:test="test#">
4:   <rdf:Description about="http://www.w3.org/RDF/Implementations/SiRPAC/"
5:    test:noValue=""/>
6: </rdf:RDF>

SiRPAC generates no triples!??!

========================

I think the second answer from SiRPAC is correct, and the first is wrong.  I
don't think a completely empty XML tag is a valid property.  Based on my
interpretation of the narrative description of the grammar in the RDFMS, I
think the BNF should really be:

[6.12] propertyElt  :== // fourth alternative:
	'<' propName bagIdAttr? (idAttr | resourceAttr) propAttr* '/>'

In other words:
	* 0 or 1 bagID attribute
	* AND, an ID attribute OR a resource reference
	* AND, 0 or more property attributes

This makes it clear that the value of an empty tag is either the ID or the
resource reference.

The abbreviated form of ="" should be explicitly disallowed.

Perry
Received on Monday, 2 August 1999 17:14:38 GMT

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