Commit 15f101d7 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-01-08 14:11:36 by cmiachon] Empty log message

Original author: cmiachon
Date: 2004-01-08 14:11:36+00:00
parent 9b0a9a41
(* include "tests/cql/TREE/type-TREE.cd";; *)
(* include "tests/cql/TREE/q4.cd";; *)
(* How many top-level sections are in Book1? *)
let fun count(x : [Any*]) : Int =
let tr_count((Int,[Any*]) -> Int)
| (n,[]) -> n
| (n,[_;t]) -> tr_count(n+1,t)
in tr_count(0,x);;
<top_section_count>(count([book]/Section));;
(* IN XQUERY
<top_section_count>
{
count(doc("book.xml")/book/section)
}
</top_section_count>
*)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment