Hi Juliane,
here is the complete query (with the use pf the emtpy function). Maybe you can find out, if it’s strange, and why
! Perhaps there is something to optimize…
The query’s aim is to get the last 100 modified documents (latest update_time attributes of the directory document) for all documents wich have an author attribute…
for $r in
(
for $d in input()/directory//doc_info[@update_time]
where not(empty(/[@doc_id=$d/@doc_id]/@author))
return $d
sort by (@update_time descending)
)
[position() > 0 and position() < 15]
return
($r)
[here is the original query for X-hive, that I want to adapt to Tamino:
let $b :=
(for $a in document(“/directory.xml”)/directory//doc_info[@update_time] sortby (./@update_time descending)
where not(empty(document(“/docs”)/[@doc_id=$a/@doc_id]/@author))
return
{
string($a/@doc_id)
}
)
return
sublist($b, 1, 100)
]
THANKS in advance…
Markus
#API-Management#webMethods#Tamino