if(StreamUtil.moveToNextElement(reader)){
int refElement = getEventType(reader);
while(reader.getEventType() != reader.END_DOCUMENT){
switch(refElement){
case SIGNEDINFO_EVENT :{
sip = new SignedInfoProcessor(signatureRoot,currentParentNS,reader,context, signPolicy,buffer);
si = (SignedInfo) sip.process();
canonWriter = sip.getCanonicalizer();
break;
}
case SIGNATUREVALUE_EVENT :{