W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2005

RE: how to prune subtrees in an XQuery result

From: Mukul Gandhi <mukul_gandhi@yahoo.com>
Date: Mon, 21 Mar 2005 07:51:18 -0800 (PST)
Message-ID: <20050321155118.38557.qmail@web41306.mail.yahoo.com>
To: Michael Kay <mhk@mhk.me.uk>, 'Sergio Andreozzi' <sergio.andreozzi@cnaf.infn.it>
Cc: www-ql@w3.org

Thats great! Thanks Mike. I learnt something..

Regards,
Mukul

--- Michael Kay <mhk@mhk.me.uk> 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/ 
Received on Monday, 21 March 2005 15:51:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:17 UTC