1) eXist may trigger a defragmentation run on a document after a node update. The defragmentation can change the node ids and storage addresses of nodes in sequences used elsewhere in the same XQuery. For example, in the following expression:
1) eXist may trigger a defragmentation run on a document after a node update. The defragmentation can change the node ids and storage addresses of nodes in sequences used elsewhere in the same XQuery. For example, in the following expression:

for $prod in //product return
update value $prod/description
with 'Updated Description'

the "update value" operation may cause a defrag to run on the updated document, which may render other elements in the $prod variable invalid. I added a listener to "for" and "let" expressions to inform them about node updates. This way, the nodes $prod will stay in sync with the database.

2) inserting a CDATA node via an XQuery update command led to an exception.

svn path=/trunk/eXist/; revision=4835

ljo/exist,wolfgangmm/exist,eXist-db/exist,wshager/exist,jessealama/exist,adamretter/exist,hungerburg/exist,opax/exist,wshager/exist,hungerburg/exist,adamretter/exist,eXist-db/exist,windauer/exist,joewiz/exist,ambs/exist,ljo/exist,dizzzz/exist,windauer/exist,adamretter/exist,zwobit/exist,shabanovd/exist,ljo/exist,RemiKoutcherawy/exist,joewiz/exist,adamretter/exist,olvidalo/exist,ambs/exist,kohsah/exist,ambs/exist,opax/exist,joewiz/exist,eXist-db/exist,jensopetersen/exist,ambs/exist,patczar/exist,RemiKoutcherawy/exist,windauer/exist,MjAbuz/exist,shabanovd/exist,patczar/exist,MjAbuz/exist,lcahlander/exist,windauer/exist,jessealama/exist,jessealama/exist,dizzzz/exist,opax/exist,windauer/exist,ambs/exist,RemiKoutcherawy/exist,shabanovd/exist,olvidalo/exist,MjAbuz/exist,zwobit/exist,RemiKoutcherawy/exist,kohsah/exist,patczar/exist,MjAbuz/exist,opax/exist,jessealama/exist,joewiz/exist,dizzzz/exist,RemiKoutcherawy/exist,MjAbuz/exist,lcahlander/exist,lcahlander/exist,kohsah/exist,wshager/exist,shabanovd/exist,ambs/exist,eXist-db/exist,wolfgangmm/exist,hungerburg/exist,joewiz/exist,adamretter/exist,RemiKoutcherawy/exist,jessealama/exist,jensopetersen/exist,wolfgangmm/exist,adamretter/exist,hungerburg/exist,kohsah/exist,jessealama/exist,wolfgangmm/exist,jensopetersen/exist,ljo/exist,eXist-db/exist,patczar/exist,opax/exist,olvidalo/exist,shabanovd/exist,jensopetersen/exist,patczar/exist,wolfgangmm/exist,olvidalo/exist,zwobit/exist,lcahlander/exist,ljo/exist,lcahlander/exist,wshager/exist,zwobit/exist,windauer/exist,joewiz/exist,wolfgangmm/exist,zwobit/exist,kohsah/exist,wshager/exist,eXist-db/exist,kohsah/exist,MjAbuz/exist,lcahlander/exist,olvidalo/exist,dizzzz/exist,jensopetersen/exist,dizzzz/exist,hungerburg/exist,dizzzz/exist,ljo/exist,jensopetersen/exist,patczar/exist,wshager/exist,zwobit/exist,shabanovd/exist