- From: Michael Luu <mluu@cougaarsoftware.com>
- Date: Fri, 19 Dec 2003 16:48:32 -0800
- To: <public-qt-comments@w3.org>
i want to query for all nodes except for a selected few. this is pretty straight forward in SQL, but how do you do it for XQuery? I can do this in XSLT but want an equivalent XQuery. for example: <Directories> <Permission> <Mask>744</Mask> </Permission> <File> <Name>.cshrc</Name> <Owner>mluu</Owner> </File> <Directory> <Name>D1</Name> <Owner>mluu</Owner> <File> <Name>README.txt</Name> <Owner>mluu</Owner> </File> <File> <Name>foo.txt</Name> <Owner>cchan</Owner> </File> <File> <Name>bar.txt</Name> <Owner>cchan</Owner> </File> <Directory> <Name>D2</Name> <Owner>mluu</Owner> </Directory> <Directory> <Name>D3</Name> <Owner>cchan</Owner> </Directory> </Directory> </Directories> i want to return all the nodes that do not contain an <Owner> element or if a node where its child <Owner> element is equal to "mluu". so the resulting output would be: <Directories> <Permission> <Mask>744</Mask> </Permission> <File> <Name>.cshrc</Name> <Owner>mluu</Owner> </File> <Directory> <Name>D1</Name> <Owner>mluu</Owner> <File> <Name>README.txt</Name> <Owner>mluu</Owner> </File> <Directory> <Name>D2</Name> <Owner>mluu</Owner> </Directory> </Directory> </Directories> thanks for your help! -mike
Received on Friday, 19 December 2003 19:49:17 UTC