[Bug 27059] [xp3.1] Function coercion, maps and arrays

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27059

--- Comment #5 from Jonathan Robie <jonathan.robie@gmail.com> ---
(In reply to John Snelson from comment #4)
> An example of function coercion against a map item to include in the spec:
> 
> let $m := map {
>   "Monday" : true(),
>   "Wednesday" : true(),
>   "Friday" : true(),
>   "Saturday" : false(),
>   "Sunday" : false()
> }
> let $days := ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
> "Saturday", "Sunday")
> return fn:filter($days,$m)

This returns:

[XPTY0004] xs:boolean expected, empty sequence found.

I would also like an example that filters, so I plan to provide both the
example above and this one:

let $m := map {
"Monday" : true(),
"Tuesday" : false(),
"Wednesday" : true(),
"Thursday" : false(),
"Friday" : true(),
"Saturday" : false(),
"Sunday" : false()
}
let $days := ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
"Saturday", "Sunday")
return fn:filter($days,$m)

=> 

Monday
Wednesday
Friday

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 16 July 2015 20:42:53 UTC