Re: [bdbxml] XQuery problem
Manish Rai Jain <[email protected]> Wed, 7 Sep 2005 18:13:28 +0800
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks a lot again! Working properly. THis is how my query looks like: ... where (some $r in $s satisfies contains($r, "FABG1_BRANA")) or (some $x in $l satisfies contains($x, "Xylitol")) or $m = "1.2.3.4 <http://1.2.3.4>" ... Regards Manish On 9/7/05, John Snelson <[email protected]> wrote: > > 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 <http://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 <http://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 >