You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Bob DuCharme <bo...@snee.com> on 2012/02/03 15:56:37 UTC

ARQ casting and XPath spec

In ARQ 2.8.8, it looks like xsd:boolean(4) returns nothing, but 
according to http://www.w3.org/TR/xpath-functions/#casting-boolean it 
should return True. Also, 
http://www.w3.org/TR/xpath-functions/#casting-to-integer says that 
xsd:integer("true"^^xsd:boolean) should return 1, but it doesn't return 
anything. The table at 
http://www.w3.org/TR/2012/WD-sparql11-query-20120105/#FunctionMapping 
says that these two casts are always allowed.

Is this an ARQ bug, or am I misunderstanding some aspect of the specs?

thanks,

Bob


Re: ARQ casting and XPath spec

Posted by Bob DuCharme <bo...@snee.com>.
OK, and in 2.8.8 they both give "Exception: CastXSD: Not a valid literal 
form", so it's a fix for 2.9.0.

Thanks!

Bob

On 2/3/2012 11:00 AM, Andy Seaborne wrote:
> On 03/02/12 14:56, Bob DuCharme wrote:
>> In ARQ 2.8.8, it looks like xsd:boolean(4) returns nothing, but
>> according to http://www.w3.org/TR/xpath-functions/#casting-boolean it
>> should return True. Also,
>> http://www.w3.org/TR/xpath-functions/#casting-to-integer says that
>> xsd:integer("true"^^xsd:boolean) should return 1, but it doesn't return
>> anything. The table at
>> http://www.w3.org/TR/2012/WD-sparql11-query-20120105/#FunctionMapping
>> says that these two casts are always allowed.
>>
>> Is this an ARQ bug, or am I misunderstanding some aspect of the specs?
>>
>> thanks,
>>
>> Bob
>>
>
> ARQ 2.9.0:
>
> $ qexpr 'xsd:boolean(4)'
> true
> $ qexpr 'xsd:integer("true"^^xsd:boolean)'
> 1
>
>     Andy

Re: ARQ casting and XPath spec

Posted by Andy Seaborne <an...@apache.org>.
On 03/02/12 14:56, Bob DuCharme wrote:
> In ARQ 2.8.8, it looks like xsd:boolean(4) returns nothing, but
> according to http://www.w3.org/TR/xpath-functions/#casting-boolean it
> should return True. Also,
> http://www.w3.org/TR/xpath-functions/#casting-to-integer says that
> xsd:integer("true"^^xsd:boolean) should return 1, but it doesn't return
> anything. The table at
> http://www.w3.org/TR/2012/WD-sparql11-query-20120105/#FunctionMapping
> says that these two casts are always allowed.
>
> Is this an ARQ bug, or am I misunderstanding some aspect of the specs?
>
> thanks,
>
> Bob
>

ARQ 2.9.0:

$ qexpr 'xsd:boolean(4)'
true
$ qexpr 'xsd:integer("true"^^xsd:boolean)'
1

	Andy