Second “value of” should reflect y, I think:

let ${$x, $y, $z} := { 'x': 1, 'y': 2 }
return (
  'Value of x', $x,
  'Value of y', $y,
  'Value of z (empty sequence)', $z
)


Cheers,

E.
_____________________________________________
Eliot Kimber
Sr. Staff Software Engineer
O: 512 554 9368

servicenow

servicenow.com<https://www.servicenow.com>

LinkedIn<https://www.linkedin.com/company/servicenow> | 
X<https://twitter.com/servicenow> | 
YouTube<https://www.youtube.com/user/servicenowinc> | 
Instagram<https://www.instagram.com/servicenow>

From: Martin Honnen via BaseX-Talk <[email protected]>
Date: Monday, May 4, 2026 at 5:23 PM
To: BaseX <[email protected]>
Subject: [basex-talk] Slight error in code sample in 
https://docs.basex.org/13/XQuery_4.0#destructuring
[External Email]


I think the code sample given in
https://docs.basex.org/13/XQuery_4.0#destructuring<https://docs.basex.org/13/XQuery_4.0#destructuring>
 as

let ${$x, $y} := { 'x': 1, 'y': 2 }
return (
  'Value of x', $x,
  'Value of z', $y,
  'Value of z (empty sequence)', $z
)

needs to be corrected to

let ${$x, $y, $z} := { 'x': 1, 'y': 2 }
return (
  'Value of x', $x,
  'Value of z', $y,
  'Value of z (empty sequence)', $z
)

Reply via email to