Hi Johannes,
Am 16.01.2013 11:31, schrieb Johannes Krampf:
> I would like to assign a sequence to a variable and then share this
> variable between two expressions. Particularly I want to create a list
> of documents to delete from the db and then return the number of deleted
> documents.
[...]
> Is there any way to achieve what I want and put my value in a scope
> accessible by both expressions?
try this:
let $nodes := ...,
$base-uris := $nodes/base-uri(),
$distinct-base-uris := distinct-values($base-uris)
return (
for $base-uri in $distinct-base-uris
return db:delete("db", $base-uri),
db:output(count($distinct-base-uris))
)
Hope that helps,
cheers, Leo
_______________________________________________
BaseX-Talk mailing list
[email protected]
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk