Re: Can properties have no value?

Ralph R. Swick scripsit:

> Good question.  I agree with your assessment that the grammar as
> specified does permit an empty element in the position of a property
> expression and that this should generally not be encouraged.

Since an empty element tag is the same as a start-tag followed
immediately by the matching end-tag, it seems to me that a
property like


means the same as


which means that "" is the value of the xx:foo property; as
you say, "" is a Literal like any other.  If the empty string is
sensible as an attribute value, it is also sensible as element content.

>    3.If E is an empty element (no content), v is the resource whose
>      identifier is given by the resource attribute of E. If the
>      content of E contains no XML markup or if parseType="Literal" is
>      specified in the start tag of E then v is the content of E (a
>      literal). Otherwise, the content of E must be another Description
>      or container and v is the resource named by the (possibly
>      implicit) ID or about of that Description or container.
> omits the case that E is an empty element and E has no resource attribute.

On my reading, it does *not* omit it; the content of E contains no XML
markup, and is the empty string.

> >triple('test#noValue',
> >       '',
> >       'online#genid2').
> >
> >But what is the value?  Is it a made-up literal?  A made-up resource?
> Janne seemed to have made the same guess that I proposed above;
> the value is an anonymous resource, for which SiRPAC generates
> an internal identifier.

I think this result is a bug: the object of the triple should be simply ''.

> I call this a SiRPAC bug.  This clearly states that the value of
> the test:noValue statement is the empty string (a Literal).
> It is the same as
>   <rdf:Description>
>    <test:noValue></test:noValue>
>   </rdf:Description>

Which is equivalent to the empty tag "<test:noValue/>", per clause 3.1
of the XML Recommendation.

John Cowan                         
       I am a member of a civilization. --David Brin

Received on Wednesday, 22 September 1999 16:55:11 UTC