[mod] update to node lts v22
This commit is contained in:
parent
0d80764174
commit
b102be8db6
6 changed files with 152 additions and 96 deletions
|
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue