Can properties have no value?

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 UTC