You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Claude Warren (JIRA)" <ji...@apache.org> on 2013/01/03 17:22:12 UTC
[jira] [Created] (JENA-375) varaible names may not contain a dot
'.'
Claude Warren created JENA-375:
----------------------------------
Summary: varaible names may not contain a dot '.'
Key: JENA-375
URL: https://issues.apache.org/jira/browse/JENA-375
Project: Apache Jena
Issue Type: Bug
Components: Jena
Affects Versions: Jena 2.7.4
Reporter: Claude Warren
Variable names like ?foo.bar fail with a
com.hp.hpl.jena.query.QueryParseException: Encountered " "." ". "" at line 1, column 32.
Was expecting one of:
<IRIref> ...
<PNAME_NS> ...
<PNAME_LN> ...
<VAR1> ...
<VAR2> ...
"a" ...
"(" ...
"!" ...
"^" ...
at com.hp.hpl.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:102)
at com.hp.hpl.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:53)
at com.hp.hpl.jena.sparql.lang.Parser.parse(Parser.java:37)
at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:156)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:79)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:52)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
...
Based on the SPARQL 1.1 Query Language (http://www.w3.org/TR/2011/WD-sparql11-query-20110512/#rVARNAME) I believe that a dot is acceptable in the variable name
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Created] (JENA-375) varaible names may not contain a dot '.'
Posted by Paul Gearon <ge...@ieee.org>.
I'm curious... why do you think a "dot" is acceptable?
I presume that you're referring to the standard "period" or "fullstop" that
occurs at 0x002E (as opposed to a similar looking character in another
codepage).
Varnames look like:
( PN_CHARS_U<http://www.w3.org/TR/2011/WD-sparql11-query-20110512/#rPN_CHARS_U>
|
[0-9] ) ( PN_CHARS_U<http://www.w3.org/TR/2011/WD-sparql11-query-20110512/#rPN_CHARS_U>
|
[0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] )*
#x002E is not in any of the hex ranges shown, so looking at PN_CHARS_U we
see:
PN_CHARS_BASE<http://www.w3.org/TR/2011/WD-sparql11-query-20110512/#rPN_CHARS_BASE>
|
'_'
OK, it's not an underscore, so look in PN_CHARS_BASE:
[A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x02FF] |
[#x0370-#x037D] | [#x037F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] |
[#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] |
[#x10000-#xEFFFF]
It's not a letter, and the lowest of the characters after the letter
classes start at #x00C0, which is much higher than #002E.
So the parser appears to be doing the right thing here.
Regards,
Paul
On Thu, Jan 3, 2013 at 11:22 AM, Claude Warren (JIRA) <ji...@apache.org>wrote:
> Claude Warren created JENA-375:
> ----------------------------------
>
> Summary: varaible names may not contain a dot '.'
> Key: JENA-375
> URL: https://issues.apache.org/jira/browse/JENA-375
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.7.4
> Reporter: Claude Warren
>
>
> Variable names like ?foo.bar fail with a
> com.hp.hpl.jena.query.QueryParseException: Encountered " "." ". "" at line
> 1, column 32.
> Was expecting one of:
> <IRIref> ...
> <PNAME_NS> ...
> <PNAME_LN> ...
> <VAR1> ...
> <VAR2> ...
> "a" ...
> "(" ...
> "!" ...
> "^" ...
>
> at
> com.hp.hpl.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:102)
> at
> com.hp.hpl.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:53)
> at com.hp.hpl.jena.sparql.lang.Parser.parse(Parser.java:37)
> at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:156)
> at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:79)
> at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:52)
> at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
> ...
>
> Based on the SPARQL 1.1 Query Language (
> http://www.w3.org/TR/2011/WD-sparql11-query-20110512/#rVARNAME) I believe
> that a dot is acceptable in the variable name
>
>
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>