Hi,
Using BaseX 9.7.1 and saxon9he-9.9.1.jar
The documentation suggests the ?result from xslt:transform-report should be a document-node where possible [1]
This seems not quite to be the case when there are processing instructions or comments at the top level. In these cases a sequence of document-nodes is returned.
/Andy
let $xml:=document{ <?something type="compact"?>, <foo/>}
return xslt:transform-report($xml,$xslt)
Returns
map {
"messages": (),
"result": (<?something type="compact"?>, <foo/>)
}