Re: Whitespace in Turtle after ^^

On 19/01/15 18:24, Gregg Kellogg wrote:
>> On Jan 19, 2015, at 9:34 AM, Andy Seaborne <andy@apache.org> wrote:
>>
>> On 19/01/15 17:19, Stian Soiland-Reyes wrote:
>>> Thank you for enlightening me, both ;)
>>>
>>> AllegroGraph & TopBraid Composer were reported to us to bark on this,
>>> but it might be a side effect of another invalid localname ( ns0:api# )
>>> which it rightly moaned about.
>>>
>>> ..And Jena, but Andy just fixed it. Sorry for giving you more work,
>>> Andy.. I guess you tested for that
>>>
>>> <s> <p> "no space after @" @en .
>>
>> is legal. The string part is misdirection!
>>
>> "no space after @"@  en .
>>
>> is illegal.
>
> Indeed;  hard to believe Eric didn't cover this in his tests :) They're otherwise quite comprehensive.

Oh yes!

> For reasons such as this the RDFa test suite has been updated from time to time to add corner cases which were missing. It might be useful if we had a version of the various test suites in GitHub so that we could make them more living, and it would be easier to update implementation reports in the future.

Good idea; I'll help.  I've been fixing SPARQL tests for RDF 1.1 and I'd 
contribute that work.

 Andy

>
> BTW, I also have a more "universal" online test runner I've developed for the CSVW work, which could pretty easily handle the various RDF test manifests and invoke implementations available as a service. This proved to be quite useful for RDFa. In the absence of any other place to host this, I may just add it to my own endpoint.
>
> Gregg
>
>>  Andy
>>
>>>
>>> case as well.
>>>
>>> On 19 Jan 2015 16:53, "Eric Prud'hommeaux" <eric@w3.org
>>> <mailto:eric@w3.org>> wrote:
>>>
>>>     * Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk
>>>     <mailto:soiland-reyes@cs.manchester.ac.uk>> [2015-01-19 16:05+0000]
>>>      > Hi, I somehow have come over some "evil" Turtle that seems to be
>>>     on the form:
>>>      >
>>>      > <http://example.com/s2> <http://example.com/p> "false"^^
>>>      > <http://www.w3.org/2001/XMLSchema#boolean> .
>>>      >
>>>      > (One word: PHP)
>>>      >
>>>      >
>>>      > Now, as bad style as this might look - I could not figure out
>>>     from the
>>>      > RDF Turtle 1.1 grammar why it shouldn't be valid.
>>>
>>>     What lead you to believe it was invalid? I've tried a few Turtle and
>>>     SPARQL parsers ('cause they use the same productions) and they all
>>>     accepted it. For example
>>>     [[
>>>     ASK { FILTER ("false"^^
>>>     <http://www.w3.org/2001/XMLSchema#boolean>)
>>>          }
>>>     ]]
>>>     passes <http://sparql.org/query-validator.html>.
>>>
>>>
>>>      > http://www.w3.org/TR/turtle/#grammar-production-RDFLiteral
>>>      >
>>>      > [128s] RDFLiteral ::= String (LANGTAG | '^^' iri)?
>>>      >
>>>      > vs.
>>>      >
>>>      > [7] predicateObjectList ::= verb objectList (';' (verb objectList)?)*
>>>      >
>>>      >
>>>      > We "all know" that whitespace is allowed around ; - and not around ^^
>>>      > - yet I can't see this reflected in these rules. Perhaps my grammar
>>>      > understanding is a bit rusty.
>>>      >
>>>      >
>>>      > http://www.w3.org/TR/turtle/#sec-grammar-ws says:
>>>      >
>>>      > > White space (production WS) is used to separate two terminals
>>>     which would otherwise be (mis-)recognized as one terminal. Rule
>>>     names below in capitals indicate where white space is significant;
>>>     these form a possible choice of terminals for constructing a Turtle
>>>     parser.
>>>      >
>>>      > > White space is significant in the production String.
>>>      >
>>>      >
>>>      > Neither RDFLiteral or predicateObjectList are listed under Terminals.
>>>      >
>>>      >
>>>      > So there's a special WS production - but that's only used between [ ]
>>>      > - e.g. so you can do
>>>      >
>>>      > [ a foaf:Person ]  #someone
>>>      >   foaf:knows  # Someone (else?)
>>>      >   [ a foaf:Person ] .
>>>      >
>>>      >
>>>      >
>>>      > String is
>>>      >
>>>      >
>>>      > [17] String ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE |
>>>      > STRING_LITERAL_LONG_SINGLE_QUOTE | STRING_LITERAL_LONG_QUOTE
>>>      >
>>>      >
>>>      >
>>>      > Can anyone enlighten me?
>>>      >
>>>      >
>>>      >
>>>      > --
>>>      > Stian Soiland-Reyes, myGrid team
>>>      > School of Computer Science
>>>      > The University of Manchester
>>>      > http://soiland-reyes.com/stian/work/
>>>     http://orcid.org/0000-0001-9842-9718
>>>      >
>>>
>>>     --
>>>     -ericP
>>>
>>>     office: +1.617.599.3509 <tel:%2B1.617.599.3509>
>>>     mobile: +33.6.80.80.35.59 <tel:%2B33.6.80.80.35.59>
>>>
>>>     (eric@w3.org <mailto:eric@w3.org>)
>>>     Feel free to forward this message to any list for any purpose other than
>>>     email address distribution.
>>>
>>>     There are subtle nuances encoded in font variation and clever layout
>>>     which can only be seen by printing this message on high-clay paper.
>>>
>>
>>
>

Received on Tuesday, 20 January 2015 11:40:11 UTC