Re: empty prefix value

  Actually, I think the BNF that is in there now constrains this.  They 
are evaluated LTR and the BNF says:

NCName  <http://www.w3.org/2010/02/rdfa/sources/rdfa-core/#P_prefix>  ':' ' '+ xs:anyURI

So it has to be a pattern that matches an NCName, a literal colon, zero or more literal spaces, and then an xs:anyURI.
BNF expressions are greedy, so ' '+ will consume all consecutive spaces.  We can make this more explicit - no
problem.  But what is in there now is correct.  But if smart people miss that, then we need to make it more
obvious!



On 9/28/2010 2:38 PM, Nathan wrote:
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=3264#c15
> "The ˇvalue spaceˇ of anyURI is the set of finite-length sequences of 
> zero or more characters.."
>
> If this (a 0 length uri-reference as you find in href="") isn't valid 
> for @prefix then do we need to define that in rdfa core with a note / 
> constraint / bnf?
>
> Best,
>
> Nathan
>
> Shane McCarron wrote:
>>  Actually, I think I disagree.  The first example would not match the 
>> pattern for @prefix values. The second wouldn't either, but in some 
>> implementations might map 'foo' to 'bar:' then not do anything with 
>> the rest of the value.
>>
>> On 9/28/2010 12:32 PM, Nathan wrote:
>>> Hi All,
>>>
>>> Just been working on CURIE (and prefix) resolution and realised that 
>>> given that @prefix contains a whitespace separated list of NCName to 
>>> xs:anyURI's then a zero length value is possible, as in:
>>> <div prefix="foo: ">
>>> and:
>>> <div prefix="foo:  bar: http://example.org/o#">
>>>
>>> Unsure if this is an issue or not but thought it best to mention.
>>>
>>> Best,
>>>
>>> Nathan
>>>
>>> expanded info:
>>>
>>>  - @prefix = NCName ':' ' ' + xs:anyURI
>>>  - xs:anyURI can be a URI or a URI Reference
>>>  - URI-reference = URI / relative-ref
>>>
>>> relative-ref can be (amongst other things) path-empty (0-length) or 
>>> path-noscheme, which given the (trimmed) BNF:
>>>
>>>   path-noscheme = segment-nz-nc *( "/" segment )
>>>   segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
>>>   unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
>>>   sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
>>>                  / "*" / "+" / "," / ";" / "="
>>>
>>> means that afaict, the following is currently valid
>>>
>>> <div prefix="foo:  bar: @ baz: $!+~"> ...
>>>
>>> resulting in:
>>>   "foo" => ""
>>>   "bar" => "@"
>>>   "baz" => "$!+~"
>>>
>>>
>>>
>>
>

-- 
Shane P. McCarron                          Phone: +1 763 786-8160 x120
Managing Director                            Fax: +1 763 786-8180
ApTest Minnesota                            Inet: shane@aptest.com

Received on Tuesday, 28 September 2010 19:44:02 UTC