[MarkLogic Dev General] choosing children node
David Sewell
dsewell at virginia.edu
Tue Feb 5 06:24:01 PST 2008
On Tue, 5 Feb 2008, Paul M wrote:
> let $n:= <doc>
> <para>
> <g:german>grussgot</g:german>
> <english>hello</english>
> Mr Herrman
> <g:german>wie gehts</g:german>
>
> <english>how are you today</english>
> We missed you at the meeting on Friday
> <joke>Well, we missed the good bier that you always bring</joke>
> </para>
> </doc>
>
> let $msg:=$n//para
> return $msg
>
> I only want either the english or the german version children of the
> para element. What is the easiest way to implement this? I only can
> envision recursively removing german child elements or english child
> elements. Is there another more efficient way?
let $msg := $n//para/(* except english)
or
let $msg := $n//para/(* except g:german)
--
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell at virginia.edu Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
-------------- next part --------------
_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general
More information about the General
mailing list