[xquery-talk] 'except' in XQuery
per at bothner.com
Tue Jan 11 09:22:33 PST 2005
padmapriya ayyagari wrote:
> I tried :
You know it really weird how mnay people report problems without
mentioning what implementation they're using. Look: the XQuery
specification isn't even done, and the different implementations
have different status - and bugs.
> 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.
'except' only removes the actual nodes in the seconds xpressions,
based on node identity. It doesn't check for children.
Also $n//* will give you lots of duplication.
I think you'll have to write a recursive tranformer.
See appendix G.4 in the latest (Octover 2004) draft.
per at bothner.com http://per.bothner.com/
More information about the talk