public static void mergeFragment ( Document fragment , Document composite , IAuthorizationPrincipal ap ) throws AuthorizationException { Element fragmentLayout = fragment . getDocumentElement ( ) ; Element fragmentRoot = ( Element ) fragmentLayout . getFirstChild ( ) ; Element compositeLayout = composite . getDocumentElement ( ) ; Element compositeRoot = ( Element ) compositeLayout . getFirstChild ( ) ; mergeChildren ( fragmentRoot , compositeRoot , ap , new HashSet ( ) ) ; }
Passes the layout root of each of these documents to mergeChildren causing all children of newLayout to be merged into compositeLayout following merging protocal for distributed layout management .