int newOffset = oldOffset;
int newLength = oldLength - replacedTextLength + insertedTextLength;
String textToParse = document.get( newOffset, newLength );
// parse partion content to containers (offset=0)
LdifFile newModel = this.ldifParser.parse( textToParse );
LdifContainer[] newContainers = newModel.getContainers();
// replace old containers with new containers
// must adjust offsets of all following containers in model
this.ldifModel.replace( oldContainers, newContainers );