P.S. Meanwhile, replacing 'true' with '1 = 1' has the expected semantics. That is
Dear BaseXer's,The following queryfor $xqV1 in collection( 'localex' )//kRecord let $xqV2 := $xqV1/*[1] , $xqV7 := $xqV1/*[2] where ( count($xqV1/*) = 2 ) and ( for $xqV3 in $xqV1/node let $xqV4 := $xqV3/*[1] where ( count($xqV3/*) = 1 ) and ( for $xqV5 in $xqV3/uid let $xqV6 := $xqV5/*[1] where ( count($xqV5/*) = 1 ) and ( ( ( $xqV6 = <string>uid.value</string> ) or ( fn:string( fn:node-name( $xqV6 ) ) = "var" ) ) ) and ( $xqV4 = $xqV5 ) return $xqV5 ) and ( $xqV2 = $xqV3 ) return $xqV3 ) return $xqV1returns our expected result, whilefor $xqV1 in collection( 'localex' )//kRecord let $xqV2 := $xqV1/*[1] , $xqV7 := $xqV1/*[2] where ( count($xqV1/*) = 2 ) and ( for $xqV3 in $xqV1/node let $xqV4 := $xqV3/*[1] where ( count($xqV3/*) = 1 ) and ( for $xqV5 in $xqV3/uid let $xqV6 := $xqV5/*[1] where ( count($xqV5/*) = 1 ) and ( ( ( $xqV6 = <string>uid.value</string> ) or ( fn:string( fn:node-name( $xqV6 ) ) = "var" ) ) ) and ( $xqV4 = $xqV5 ) return $xqV5 ) and ( $xqV2 = $xqV3 ) return $xqV3 ) and ( true ) return $xqV1which is the same query with an 'and ( true )' added to the outer where-clausereturns no results.Should we expect thatfor ... let ... where C return ... == for ... let ... where C and ( true ) return ...?Best wishes,--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SW