Unexpected result with simple mapping operator and sequence of maps

Friday, 30 January 2026 · 3 messages
AG
Amanda Galtman30 Jan 2026 17:13 #
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
JW
Joe Wicentowski30 Jan 2026 17:55 #
Hi Amanda, This isn't a direct answer to your question, but with BaseX 12.2 Query A returns the expected result. Joe
Quoted text · Amanda Galtman · 36 lines
On Fri, Jan 30, 2026 at 11:14 AM Amanda Galtman via BaseX-Talk < basex-talk at 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 > > >
AG
Amanda Galtman30 Jan 2026 18:00 #
Thanks, Joe! I'll upgrade to 12.2. Best, Amanda
Quoted text · Joe Wicentowski · 35 lines
On Friday, January 30th, 2026 at 11:54 AM, Joe Wicentowski <joewiz at 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 at 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

⚡Generated with XQuery