Commit 66cc3180 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-11-27 15:41:48 by cmiachon] q2x modified

Original author: cmiachon
Date: 2003-11-27 15:41:48+00:00
parent 1aa7065a
(*
Create a flat list of all the title-author pairs,
with each pair enclosed in a "result" element.
*)
let q2x =
<results>
select <result>[t a]
select <result>[!([b]/<title>_) a]
from b in [doc]/<book>_,
t in [b]/<title>_,
a in [b]/<author>_ ;;
let q2p=
......@@ -11,3 +16,23 @@ let q2p=
from <bib>[b::Book+] in [doc],
<book>[t&Title la::Author+ ;_] in b,
a in la ;;
(* in xquery
<results>
{
for $b in doc("http://www.bn.com/bib.xml")/bib/book,
$t in $b/title,
$a in $b/author
return
<result>
{ $t }
{ $a }
</result>
}
</results>
*)
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