Sorry that nobody answered your question earlier
(I was on vacation…)
I hope the following solution will help you.
Yo can test it with the latest version of quip (I
did not check earlier versions).
From this solution you can learn several things:
* a nice example of qualified expressions
* nested flower expressions
* computed element construction
* definition of utility function
Sven Eric
–snip------
define function removeAttr($el){
element {name($el)} {$el/node()}
}
let $orders :=
(<order_id ino:id=“1” c_ob_id=“1” p_ob_id=“2”/>
,<order_id ino:id=“2” c_ob_id=“1” p_ob_id=“1”/>
,<order_id ino:id=“2” c_ob_id=“2” p_ob_id=“1”/>
)
let $customers :=
(c1
,c2
)
let $products :=
(p1
,p2
)
for $c in $customers
return
{
removeAttr($c),
for $p in $products
where some $o in $orders
satisfies ($p/@ino:id = $o/@p_ob_id
and $c/@ino:id = $o/@c_ob_id)
return
removeAttr($p)
}
#Tamino#API-Management#webMethods