Added a reset on the nodeFactoryInstanceCnt in the startDocument() function. By setting nodeFactoryInstanceCnt to 1 in this function it prevents the Indexer from assigning different values to nodes (elements and PIs) in the root of the document on the second pass when it's being saved (validation being the first pass). I chose to set it to 1 instead of 0 because the InMemmory serializer considers the document to be the first node, and thus gives it the id of 0. So, setting the nodeFactoryInstanceCnt to 1, makes everything line up properly
Added a reset on the nodeFactoryInstanceCnt in the startDocument() function. By setting nodeFactoryInstanceCnt to 1 in this function it prevents the Indexer from assigning different values to nodes (elements and PIs) in the root of the document on the second pass when it's being saved (validation being the first pass). I chose to set it to 1 instead of 0 because the InMemmory serializer considers the document to be the first node, and thus gives it the id of 0. So, setting the nodeFactoryInstanceCnt to 1, makes everything line up properly

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

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