examples/xmlpatterns/filetree/queries/listCPPFiles.xq
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:46:37 +0200
branchRCL_3
changeset 5 d3bac044e0f0
parent 0 1918ee327afb
permissions -rw-r--r--
Revision: 201007 Kit: 201008

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>