- From: Nathan <nathan@webr3.org>
- Date: Tue, 28 Sep 2010 20:56:51 +0100
- To: Shane McCarron <shane@aptest.com>
- CC: RDFA Working Group <public-rdfa-wg@w3.org>
Shane McCarron wrote: > 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. just to make sure, I'm saying the problem is that an empty string is a valid xs:anyURI, so given two valid prefix mappings: ("foo" = "") and ("bar" => "@") and given that @prefix contains a white space separated list of prefix-name URI pairs of the form you mention, then this must be serialized as: <div prefix="foo: bar: @"> are you agreeing and saying that's fine, or that "" can't be used as an xs:anyURI with @prefix, or something else? Cheers, Nathan > 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" => "$!+~" >>>> >>>> >>>> >>> >> >
Received on Tuesday, 28 September 2010 20:04:24 UTC