{
// TODO: Ideally we don't want to manipulate the original
// dominant document but use its copy for merge.
//Document mDoc = (Document) dDocument.clone(); // doesn't merge properly
Document mDoc = dDocument;
PlexusRootElement dCSE = new PlexusRootElement( mDoc.getRootElement() );
PlexusRootElement rCSE = new PlexusRootElement( rDocument.getRootElement() );
dCSE.merge( rCSE );
// the contents are merged into the dominant document DOM.
return mDoc;
}