source: trunk/examples/xmlpatterns/qobjectxmlmodel/queries/statisticsInHTML.xq@ 160

Last change on this file since 160 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 1.8 KB
Line 
1<html>
2 <head>
3 <title></title>
4 </head>
5 <body>
6 <p>In total the tree has {count($root//QObject)} QObject instances.</p>
7 <p>Order by occurrence, the QObjects are:</p>
8
9 <ol>
10 {
11 for $i in $root/preceding-sibling::metaObjects/metaObject
12 let $count := count($root//QObject[@className eq $i/@className])
13 stable order by $count descending
14 return if($count > 1)
15 then <li>{string($i/@className), $count} occurrences</li>
16 else ()
17 }