Hi Andreas,
let $docitem:= .//docitem let $doc_id := data($docitem/@itemid) let $documentname := concat('//htmlfolder/', $doc_id, '.html') return file:write($documentname, $items)
BaseX always tells me that "no sequences are allowed regarding $docitem/@itemid". What could be the problem there, or how could I solve this problem. I have tried several combinations because from what I have found on the web regarding my problem the solution should go into a similar direction. Would please somebody of you be so nice to help me with that. Every hint would be very much appreciated!
If I got it right, you need to loop through all single items instead of binding them only once. This can be done by replacing "let" with "for". An Example:
for $docitem in (<a itemid='a'/>, <b itemid='b'/>) let $doc_id := data($docitem/@itemid) let $documentname := concat('//htmlfolder/', $doc_id, '.html') return $documentname
If I didn't get the point, feel free to ask again, Christian