[ 
https://issues.apache.org/jira/browse/JENA-1216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15397382#comment-15397382
 ] 

ASF subversion and git services commented on JENA-1216:
-------------------------------------------------------

Commit 53115302588c7d03f0e22e35d3da1ce7a87a83f3 in jena's branch 
refs/heads/master from [~andy.seaborne]
[ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=5311530 ]

JENA-1216: Trim whitespace.


> xsd:integer literals with leading/trailing whitespace not handled as values.
> ----------------------------------------------------------------------------
>
>                 Key: JENA-1216
>                 URL: https://issues.apache.org/jira/browse/JENA-1216
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: Jena 3.1.0
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>             Fix For: Jena 3.1.1
>
>
> This throws an exception:
> {noformat}
>         Node n = SSE.parseNode("' 1'^^xsd:integer") ;
>         NodeValue.makeNode(n) ;
> {noformat}
> Once you know that, it's quite easy to cause the problem from SPARQL:
> {noformat}
> PREFIX :  <http://example/> .
> PREFIX xsd:     <http://www.w3.org/2001/XMLSchema#>
> # whitespace in the lexical form.
> :s :p " 1"^^xsd:integer .
> {noformat}
> and any query with a FILTER that uses the value of the literal.
> {noformat}
> SELECT *
> WHERE {
>       ?s ?p ?o .
>       FILTER ( ?o != 9 )
> }
> {noformat}
> It affects xsd:integer and derived types, not other datatypes.
> Because Turtle short form for integers does not generate this situation, it 
> is masked to some extent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to