W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > January 2009

Re: Is about="[talk:]" a valid CURIE?

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Wed, 07 Jan 2009 14:01:51 -0500
Message-ID: <4964FC1F.3090909@digitalbazaar.com>
To: RDFa Developers <public-rdf-in-xhtml-tf@w3.org>

Shane McCarron wrote:
> Manu Sporny wrote:
>>
>> curie :=   [ [ prefix ] ':' ] reference
>>
>> Which, I believe, means that this:
>>
>> about="[talk:]"
>>
>> is invalid, even if talk is specified as a valid prefix earlier in the
>> document.
>>   
> No, that's wrong. Reference can be an empty string according to the
> associated RFC.

Just got off the phone with Shane... He was kind enough to explain
exactly how someone could understand this from reading the spec. There
were two key points I was missing:

1. The CURIE statement is written in eBNF[1] - I thought it was written
   in some sort of W3C modified regex syntax.
   (eBNF statement) curie := [ [ prefix ] ':' ] reference

2. Not specifying anything for reference is technically valid per the
   IRI spec[2]. Here's how:

   reference      := irelative-ref
   irelative-ref  = irelative-part [ "?" iquery ] [ "#" ifragment ]
   irelative-part = "//" iauthority ipath-abempty
                       / ipath-absolute
                       / ipath-noscheme
                       / ipath-empty
   ipath-empty    = 0<ipchar>

Therefore /reference/ can be /ipath-empty/ and thus, you can have:

prefix:

Just to see if this was just confusing me, or would confuse future
implementers, I asked three of our engineers to briefly look at the
CURIE section of the RDFa spec and state whether or not the following
were valid CURIEs forms (Y means "Yes", N means "No", ? means "Don't know"):

Y Y N prefix           (Correct answer: N)
N N N prefix:          (Correct answer: Y) *current discussion topic
Y Y Y prefix:reference (Correct answer: Y)
N N N :                (Correct answer: N)
Y Y ? :reference       (Correct answer: Y)
Y Y Y reference        (Correct answer: Y)

This means that:

1. We need a test case clarifying this, which I'll put together.
2. Ivan gets to keep his implementation as-is... and librdfa will have
   to change :)

-- manu

[1] http://en.wikipedia.org/wiki/Extended_Backus–Naur_form
[2] http://www.ietf.org/rfc/rfc3987.txt

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.

blog: Fibers are the Future: Scaling Past 100K Concurrent Requests
http://blog.digitalbazaar.com/2008/10/21/scaling-webservices-part-2
Received on Wednesday, 7 January 2009 19:02:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 January 2009 19:02:33 GMT