Re: PROPOSAL to close ISSUE-40: no triples for empty elements

Sebastian,

On 5 Sep 2010, at 18:07, Sebastian Heath wrote:
> Somebody may well want to represent that the value of data as it  
> came to them was "".

Okay, let's suspend disbelief for a second and assume someone *really*  
wants to author a document with zero-length strings. They can still do  
it, using @content="".

> I think we should not cut off the use
> case whereby somebody is representing an empty string by <span
> property="foo:bar"></span>.

If you see this in a file in the wild, I *bet* you 100:1 that it's  
there because the RDFa is generated from a template that reads <span  
property="foo:bar">{$templatevar}</span> and the template author  
didn't consider the effect of a zero-length template var on the  
generated RDFa (or couldn't be bothered to add the extra template code  
to suppress the zero-length triple).

> If there's an @property, then it's probably RDFa and should
> be parsed. Simpler for authors, simpler for parser writers.

It is definitely *not* simpler for authors. It means that templates  
which generated completely valid XHTML before adding RDFa now need  
special casing once RDFa is added, because otherwise they will  
generate empty RDFa literals which do not match author intent.

It is also *not* simpler for consumers of RDFa data, because it  
requires special casing in downstream apps if they want to deal with  
real-world data from the wild.

It certainly *is* simpler for the spec writers and for parser  
implementers, but that should be a minor concern. Document authors  
before library users before library implementers before spec writers!

Best,
Richard


>
> -Sebastian
>
> On Sun, Sep 5, 2010 at 10:55 AM, Manu Sporny <msporny@digitalbazaar.com 
> > wrote:
>> If there are no objections to this proposal in 14 days, we will close
>> ISSUE-40: no triples for empty elements.
>>
>> http://www.w3.org/2010/02/rdfa/track/issues/40
>>
>> We have traditionally gone to great lengths to not generate useless
>> triples. This is in that same vein - an attempt to not generate  
>> useless
>> triples. Having a triple like the following is mostly useless:
>>
>> <> foo:bar "".
>>
>> While one could make the argument that the existence of the triple  
>> could
>> trigger some sort of behavior, the much stronger counter-argument is
>> that, due to templating engines and lazy programming, there will be  
>> far
>> more useless triples generated than useful triples.
>>
>> I propose that we change the RDFa Core processing rules such that an
>> element that contains a @property attribute, no @content attribute,  
>> and
>> no text content will not generate a triple.
>>
>> Please comment in 14 days from this post if you object to this  
>> proposal.
>> If there are no objections within 14 days, the specification text  
>> will
>> be added and ISSUE-40 will be closed.
>>
>> -- manu
>>
>> --
>> Manu Sporny (skype: msporny, twitter: manusporny)
>> President/CEO - Digital Bazaar, Inc.
>> blog: WebID - Universal Login for the Web
>> http://blog.digitalbazaar.com/2010/08/07/webid/2/
>>
>>

-- 
Linked Data Technologist • Linked Data Research Centre
Digital Enterprise Research Institute (DERI), NUI Galway, Ireland
http://linkeddata.deri.ie/
skype:richard.cyganiak
tel:+353-91-49-5711

Received on Sunday, 5 September 2010 17:35:41 UTC