Unexpected result with simple mapping operator and sequence of maps
Hi, BaseX folks. In BaseX 12.1, Query A below returns (false, false), but I expected (true, false). Query B returns true, as I expected. Query C returns (true, false) as expected. Query A let $map1 := map{'key1': 'string'} let $map2 := map{'key1': [] } return ($map1, $map2) ! (. instance of map(xs:string, xs:anyAtomicType) ) Query B let $map1 := map{'key1': 'string'} return $map1 ! (. instance of map(xs:string, xs:anyAtomicType) ) Query C let $map1 := map{'key1': 'string'} return ($map1, 0) ! (. instance of map(xs:string, xs:anyAtomicType) ) Am I missing something, or is the Query A behavior a bug? Thanks, Amanda
Hi Amanda, This isn't a direct answer to your question, but with BaseX 12.2 Query A returns the expected result. Joe On Fri, Jan 30, 2026 at 11:14 AM Amanda Galtman via BaseX-Talk < basex-talk@mailman.uni-konstanz.de> wrote:
Hi, BaseX folks.
In BaseX 12.1, Query A below returns (false, false), but I expected (true, false). Query B returns true, as I expected. Query C returns (true, false) as expected.
Query A
let $map1 := map{'key1': 'string'} let $map2 := map{'key1': [] } return ($map1, $map2) ! (. instance of map(xs:string, xs:anyAtomicType) )
Query B
let $map1 := map{'key1': 'string'} return $map1 ! (. instance of map(xs:string, xs:anyAtomicType) )
Query C
let $map1 := map{'key1': 'string'} return ($map1, 0) ! (. instance of map(xs:string, xs:anyAtomicType) )
Am I missing something, or is the Query A behavior a bug?
Thanks, Amanda
Thanks, Joe! I'll upgrade to 12.2. Best, Amanda On Friday, January 30th, 2026 at 11:54 AM, Joe Wicentowski <joewiz@gmail.com> wrote:
Hi Amanda,
This isn't a direct answer to your question, but with BaseX 12.2 Query A returns the expected result.
Joe
On Fri, Jan 30, 2026 at 11:14 AM Amanda Galtman via BaseX-Talk <basex-talk@mailman.uni-konstanz.de> wrote:
Hi, BaseX folks.
In BaseX 12.1, Query A below returns (false, false), but I expected (true, false). Query B returns true, as I expected. Query C returns (true, false) as expected.
Query A
let $map1 := map{'key1': 'string'} let $map2 := map{'key1': [] } return ($map1, $map2) ! (. instance of map(xs:string, xs:anyAtomicType) )
Query B
let $map1 := map{'key1': 'string'} return $map1 ! (. instance of map(xs:string, xs:anyAtomicType) )
Query C
let $map1 := map{'key1': 'string'} return ($map1, 0) ! (. instance of map(xs:string, xs:anyAtomicType) )
Am I missing something, or is the Query A behavior a bug?
Thanks, Amanda
participants (2)
-
Amanda Galtman -
Joe Wicentowski