declare variable $where as xs:string := string($fileTree/@filePath);
All cpp files in: {$where}
cpp-files found in {$where} sorted by size:
{
for $file in $fileTree//file[@suffix = "cpp"]
order by xs:integer($file/@size)
return
-
{string($file/@fileName)}, size: {string($file/@size)}
}