Slight error in code sample in https://docs.basex.org/13/XQuery_4.0#destructuring
Monday, 4 May 2026 · 2 messages · last reply 5 May 2026
MH
Martin Honnen4 May 2026 18:33 #
I think the code sample given in
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
)EK
Eliot Kimber5 May 2026 00:50 #
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>
Quoted text · Martin Honnen · 20 lines
From: Martin Honnen via BaseX-Talk <basex-talk at mailman.uni-konstanz.de> Date: Monday, May 4, 2026 at 5:23 PM To: BaseX <basex-talk at mailman.uni-konstanz.de> 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 )
Written for BaseX 12.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery