[mod] update to node lts v22

This commit is contained in:
Andy Bunce 2025-10-27 15:54:51 +00:00
parent 0d80764174
commit b102be8db6
6 changed files with 152 additions and 96 deletions

View file

@ -19,14 +19,15 @@ as element(*){
:concrete to abstract: simplify by omitting elements with only one child
:)
declare function ast:flatten($input as element()) as element() {
if (1=count($input/*)) then ast:flatten($input/*)
if (1=count($input/*))
then ast:flatten($input/*)
else element {node-name($input) }
{$input/@*,
for $child in $input/node()
return
if ($child instance of element())
then ast:flatten($child)
else $child
if ($child instance of element())
then ast:flatten($child)
else $child
}
};