qexo-general
[Top][All Lists]
Advanced

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

Re: [Qexo-general] nop operator


From: Per Bothner
Subject: Re: [Qexo-general] nop operator
Date: Sun, 03 Aug 2003 00:17:19 -0700
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030612

Francois Leygues wrote:

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 !

I just checked in a sort-of fix.  It's not a clean fix, since
it makes gnu.lists depend on gnu.xml - which will break if anyone
tried to configued kawa with --disable-xml.
--
        --Per Bothner
address@hidden   http://per.bothner.com/






reply via email to

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