[xquery-talk] nested if, then, for statements
Cindy Girard
clm6u at virginia.edu
Thu Nov 11 15:07:22 PST 2004
Hi ,
I'm trying to do something like the statement below, but I'm getting
errors. Do I have the syntax wrong, or do I need to go about it
completely differently?
The error is on the 3rd line:
unexpected token: in [at line ... ]
Thanks,
Cindy
======================================
$query := if ($ttl != "")
then (
for ($entries in collection('{$collctn}')//TEI.2[. &= '*{$kwds}*' and descendant::head &= '*{$ttl}*'])
(if $entries/@id = "ppp.00271"
(
then ...
)
else if $entries/@id = "ppp.00237"
(
then ...
)
else if $entries/@id = "ppp.00473"
(
then ...
)
else
(
...
)
)
else if (...)
then ...
else
... ,
-----
- Cindy
Cynthia M. Girard
IATH, University of Virginia
clm6u at virginia.edu
"Danger? I laugh in the face of danger!
...and then I hide until it goes away."
More information about the talk
mailing list