RE: how to prune subtrees in an XQuery result
Mukul Gandhi <[email protected]> Mon, 21 Mar 2005 07:51:18 -0800 (PST)
| Newsgroups | gmane.comp.web.query-languages |
|---|---|
| Message-ID | <[email protected]> |
Thats great! Thanks Mike. I learnt something.. Regards, Mukul --- Michael Kay <[email protected]> wrote: > > "where $A/$matches" is not wrong, but given that $A > is a singleton, it's > trivially the same as "where $matches". > > I think you can still avoid repeating the condition > even when the "or" > becomes an "and". > > <Results> { > for $A in doc("data.xml")/ASet/A > let $matchesB := $A/B[. = ("red","yellow")] > let $matchesC := $A/C[. = ("chair","table")] > where ($matchesB and $matchesC) > return > <A> > {$A/@*, $matchesB, $matchesC } > </A> > }</Results> __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/