Commit 82ba1b11 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-11-25 10:58:07 by cmiachon] added test files for CQL -

Original author: cmiachon
Date: 2003-11-25 10:58:07+00:00
parent 44eb649e
type Bib = <bib>[Book*] ;;
type Book = <book year=String>[Title (Author+ | Editor+ ) Publisher Price ];;
type Author = <author>[Last First ];;
type Editor = <editor>[Last First Affiliation ];;
type Title = <title>[PCDATA ];;
type Last = <last>[PCDATA];;
type First = <first>[PCDATA];;
type Affiliation = <affiliation>[PCDATA];;
type Publisher = <publisher>[PCDATA];;
type Price = <price>[PCDATA];;
let doc : Bib = <bib>[
<book year="1994">[
<title>['TCP/IP Illustrated']
<author>[<last>['Stevens']
<first>['W.']]
<publisher>['Addison-Wesley']
<price>['65.95']
]
<book year="1992">[
<title>['Advanced Programming in the Unix environment']
<author>[<last>['Stevens'] <first>['W.']]
<publisher>['Addison-Wesley']
<price>['65.95']
]
<book year="2000">[
<title>['Data on the Web']
<author>[<last>['Abiteboul'] <first>['Serge']]
<author>[<last>['Buneman'] <first>['Peter']]
<author>[<last>['Suciu'] <first>['Dan']]
<publisher>['Morgan Kaufmann Publishers']
<price>['39.95']
]
<book year="1999">[
<title>['The Economics of Technology and Content for Digital TV']
<editor>[
<last>['Gerbarg'] <first>['Darcy']
<affiliation>['CITI']
]
<publisher>['Kluwer Academic Publishers']
<price>['129.95']
]];;
(* /@ not implemented
let q1x =
<bib>
select <book year=y>t
from b in [doc]/<book>_ ,
y in b/@year,
p in b/<publisher>_,
t in b/<title>_
where (p = [<publisher>"Addison-Wesley"]) and (int_of(y)>>1991);;
*)
let q1p =
<bib>
select <book year=y> t
from <bib>[b::Book*] in [doc],
<book year=y>[t::Title _+ <publisher>"Addison-Wesley";_] in b
where int_of(y)>>1991 ;;
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