[xquery-talk] 'except' in XQuery
asn.padmapriya at gmail.com
Tue Jan 11 11:48:11 PST 2005
I tried :
for $n in fn:document("docs/xmark.xml")//*
return $n//* except ($n/people/person)
But it still returns the 'person' element along with it's children.
On Tue, 11 Jan 2005 08:37:04 -0500, Joel Stewart
<stewajc_0720 at hotmail.com> wrote:
> I think except only works on a sequence. So far, I can only do an except
> for a particular nodes children, e.g.
> for $child in ("doc.xml")/a/b
> return $child/* except ($child/c)
> Extra credit for anyone able to come up with a generic method to strip out
> all occurances of any series of paths. e.g.
> filter($mynode, ("//div", "//h4"))
> >From: padmapriya ayyagari <asn.padmapriya at gmail.com>
> >Reply-To: padmapriya ayyagari <asn.padmapriya at gmail.com>
> >To: talk at xquery.com
> >Subject: [xquery-talk] 'except' in XQuery
> >Date: Tue, 11 Jan 2005 05:15:42 -0500
> >Hello everyone,
> >I want to output all the parts of an XML document except those that
> >satisfy a particular xpath expression. I'm trying to do this by
> >fn:document("docs/xmark.xml")/fn:document("docs/xmark.xml")//* except
> >But I still get the nodes that satisfy /site/people. Is there a
> >problem with my xquery syntax?? I've also tried '/*' instead of '//*'
> >but to no avail.
> >talk at xquery.com
More information about the talk