summaryrefslogtreecommitdiff
path: root/examples/xmlpatterns/filetree/queries/listCPPFiles.xq
blob: ab8dc35141d4bce3e76899f580a259f310790488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
declare variable $where as xs:string := string($fileTree/@filePath);
<html>
  <head>
    <title>All cpp files in: {$where}</title>
  </head>
  <body>
    <p>
      cpp-files found in {$where} sorted by size:
    </p>
    <ul> {
      for $file in $fileTree//file[@suffix = "cpp"]
      order by xs:integer($file/@size)
      return
        <li>
          {string($file/@fileName)}, size: {string($file/@size)}
        </li>
    } </ul>
  </body>
</html>