Commit 2a35ad05 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-11-25 11:33:12 by cmiachon] Empty log message

Original author: cmiachon
Date: 2003-11-25 11:33:13+00:00
parent e902bc82
type Reviews =<reviews>[Entry*];;
type Entry = <entry> [ Title Price Review];;
(*type Title = <title>[PCDATA];;*)
(*type Price= <price>[PCDATA];;*)
type Review =<review>[PCDATA];;
let amazon=
<reviews>[
<entry>[
<title>['Data on the Web']
<price>['34.95']
<review>
['A very good discussion of semi-structured database
systems and XML.']
]
<entry>[
<title>['Advanced Programming in the Unix environment']
<price>['65.95']
<review>
['A clear and detailed discussion of UNIX programming.']
]
<entry>[
<title>['TCP/IP Illustrated']
<price>['65.95']
<review>
['One of the best books on TCP/IP.']
]
];;
(* /@ not implemented
let q5x =
<books-with-prices>
select <book-with-price>[t1 <price-amazon>([p2]/_) <price-bn>([p1]/_)]
from b in [doc]/<book>_ ,
y in [b]/@year,
t1 in [b]/<title>_,
e in [amazon]/<entry>_,
t2 in [e]/<title>_,
p2 in [e]/<price>_,
p1 in [b]/<price>_
where t1=t2 and int_of(y)>>1990;;
*)
let q5p =
<books-with-prices>
select <book-with-price>[t2 <price-amazon>p2 <price-bn>p1 ]
from <bib>[b::Book*] in [doc],
<book year=y>[t1&Title _* <price>p1] in b,
<reviews>[e::Entry*] in [amazon],
<entry>[t2&Title <price>p2 ;_] in e
where t1=t2 and 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