Hello!
I have problem with a - in my opinion - complex XQuery.
I have three doctypes and want to do a nested delete.
doctype b depends on doctype a
doctype c depends on doctype b
So for example:
If a delete a element in doctype a where aID = 5, i want to delete all doctypes b where aID = bID. So far, seems no problem. But now I also want to delete all doctypes c where $cOtherID = $bOtherID AND the above options matches.
Get all elements with:
for $a in input()/docA
for $b in input()/docB
where $a/ID = $b/ID
and $b/ID = 5
return
{$a/ID}
{$b/otherID}
{for $c in input()/docC
where $c/otherID = $b/otherID
return $c/anotherValue }
It works fine. Gives me a list like that:
5
1
1
3
4
Now, i want to rewrite this query to delete all doctypes a,b and c where the query returns values.
Any ideas? Or should I split this into different queries? One query would be great.
Thanks in advance.
Regards,
Christian
#Tamino#webMethods#API-Management