qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qexo-general] nop operator


From: Francois Leygues
Subject: [Qexo-general] nop operator
Date: Sat, 02 Aug 2003 19:52:20 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

I didnt see you preceeding response on the mailing list, so I repost.
with last version available at this date.

Lets define a kind of nop operator:

define function x(){<a x="0"><a x="1"/><a x="2"/></a>}
define function s($x){<a x="{$x/string(@x)}">{for $n in $x/a return <a x="{$n/string(@x)}"/>}</a>}

s(t()) returns
<a x="0"><a x="1" /><a x="2" /></a>

and

s(s(t())) returns
<a x="0"><a x="1" /><a x="2" /></a>

and s(s(s(t())))/a/@x returns
x="1" x="2"


it workz! (it doesnt before...)
I can now perform successive transformations on xml trees.
Thanks !





reply via email to

[Prev in Thread] Current Thread [Next in Thread]