Hi everyone,

We are using ARQ's SPARQL parser to parse graph patterns and noticed that it 
allows dashes in variable names if these variables occur as the *object* 
location of a triple pattern. If the variable names at the *subject* location 
of a triple pattern contains dashes, it fails with a ParseException. As far as 
we could tell the SPARQL specification does not allow dashes in variable names 
at all (https://www.w3.org/TR/sparql11-query/#rVARNAME). The pattern1 and 
pattern2 below should both fail, but the first one does not fail and the second 
does fail.

String pattern1 = "<test> https://www.tno.nl/example/b ?community-ID .";
ARQParser parser1 = new ARQParser(new StringReader(pattern1));
parser1.GroupGraphPatternSub();

String pattern2 = "?community-ID https://www.tno.nl/example/b <test> .";
ARQParser parser2 = new ARQParser(new StringReader(pattern2));
parser2.GroupGraphPatternSub();

Is this a bug?

Best regards,

Barry
This message may contain information that is not intended for you. If you are 
not the addressee or if this message was sent to you by mistake, you are 
requested to inform the sender and delete the message. TNO accepts no liability 
for the content of this e-mail, for the manner in which you use it and for 
damage of any kind resulting from the risks inherent to the electronic 
transmission of messages.

Reply via email to