WhileInstruction i9 = new WhileInstruction("xmltest.rs"); //$NON-NLS-1$
//need to move this up here so it can be referenced by "If" instruction
ProcessorInstruction i17 = new MoveCursorInstruction("xmltest.rs"); //$NON-NLS-1$
IfInstruction i10 = new IfInstruction( );
descriptor = NodeDescriptor.createNodeDescriptor("Item", null, AddNodeInstruction.ELEMENT, null, null, null,false, null, MappingNodeConstants.NORMALIZE_TEXT_PRESERVE);//$NON-NLS-1$
ProcessorInstruction i11 = new AddNodeInstruction(descriptor);
ProcessorInstruction i12 = new MoveDocInstruction(MoveDocInstruction.DOWN);
descriptor = NodeDescriptor.createNodeDescriptor("ItemID", null, AddNodeInstruction.ATTRIBUTE, null, null, null,false, null, MappingNodeConstants.NORMALIZE_TEXT_PRESERVE);//$NON-NLS-1$
ProcessorInstruction i13 = new AddNodeInstruction(descriptor, new ElementSymbol("xmltest.rs.itemNum"));//$NON-NLS-1$
descriptor = NodeDescriptor.createNodeDescriptor("Name", null, AddNodeInstruction.ELEMENT, null, null, null,false, null, MappingNodeConstants.NORMALIZE_TEXT_PRESERVE);//$NON-NLS-1$
ProcessorInstruction i14 = new AddNodeInstruction(descriptor, new ElementSymbol("xmltest.rs.itemName"));//$NON-NLS-1$
descriptor = NodeDescriptor.createNodeDescriptor("Quantity", null, AddNodeInstruction.ELEMENT, null, null, null,false, null, MappingNodeConstants.NORMALIZE_TEXT_PRESERVE);//$NON-NLS-1$
ProcessorInstruction i15 = new AddNodeInstruction(descriptor, new ElementSymbol("xmltest.rs.itemQuantity")); //$NON-NLS-1$
ProcessorInstruction i16 = new MoveDocInstruction(MoveDocInstruction.UP);
ProcessorInstruction i18 = new MoveDocInstruction(MoveDocInstruction.UP);
ProcessorInstruction i19 = new MoveDocInstruction(MoveDocInstruction.UP);
ProcessorInstruction i20 = new MoveDocInstruction(MoveDocInstruction.UP);
ProcessorInstruction i21 = new EndDocumentInstruction();
// Stitch them together
Program program = new Program();
program.addInstruction(i0);
program.addInstruction(i1);
program.addInstruction(i2);
program.addInstruction(i3);
program.addInstruction(i4);
program.addInstruction(i5);
program.addInstruction(i6);
program.addInstruction(i7);
program.addInstruction(i8);
program.addInstruction(i9);
Program whileProgram = new Program();
i9.setBlockProgram(whileProgram);
whileProgram.addInstruction(i10);
Program thenProgram = new Program();
Condition cond = new CriteriaCondition(crit, thenProgram);
i10.addCondition(cond);
thenProgram.addInstruction(i11);
thenProgram.addInstruction(i12);
thenProgram.addInstruction(i13);
thenProgram.addInstruction(i14);