Re: [bdbxml] XQuery problem

John Snelson <[email protected]> Wed, 07 Sep 2005 10:35:37 +0100
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Manish Rai Jain wrote:
> I am trying to query across a container. Basically, the query is to have 
> 3 conditions. If ANY of these is TRUE, then return the result.
> ************************************************************************
> for $x in collection("bulk.dbxml")/gnv_enzyme_pathway/db_entry
> let $m := $x/enzyme_id
> let $s := $x/swissprot_reference_list/reference/@name
> where some $r in $s
>         satisfies contains($r, "FABG1_BRANA")
> return
> <result>
>         <Enzyme_id id="{$m}"></Enzyme_id>
> </result>
> *************************************************
> 
> In this query, I need to add another condition, which will go like
> .....
> where some $r in $s satisfies contains($r, "FABG1_BRANA") OR if 
> $m="1.1.1.10"
> return
> .....
> 
> But, this is not working properly. Any ideas/suggestions how to add 
> these conditions in xquery.

The "where" clause should look like this:

where some $r in $s satisfies contains($r, "FABG1_BRANA") or $m = "1.1.1.10"

John

-- 
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com

Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml


------------------------------------------
To remove yourself from this list, send an
email to [email protected]