Re: empty prefix value

  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 18:37:03 UTC