Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
66cc3180
Commit
66cc3180
authored
Jul 10, 2007
by
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
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/cql/q2.cd
View file @
66cc3180
(*
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>
*)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment