[mod] symbol opts
This commit is contained in:
parent
b102be8db6
commit
c4d2770bae
3 changed files with 24 additions and 8 deletions
|
|
@ -34,10 +34,11 @@ declare function ast:flatten($input as element()) as element() {
|
|||
(:-------------------------------------------:)
|
||||
|
||||
declare function ast:report($el as element(*)) {
|
||||
<analysis>
|
||||
<total-elements>{count($el//element())}</total-elements>
|
||||
<max-depth>{ast:max-node-depth($el)}</max-depth>
|
||||
</analysis>
|
||||
{
|
||||
"total-elements": count($el//element()),
|
||||
"max-depth": ast:max-node-depth($el),
|
||||
"char-count": string-length($el)
|
||||
}
|
||||
};
|
||||
|
||||
declare function ast:max-depth($nodes as node()*) as xs:integer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue