* @param element used to identify the device layout
* @return an element equivalent to that given but this time in the clone.
* Will be null if the given element is not a format
*/
public static Element cloneContainingDeviceLayout(Element element) {
JDOMFactory factory = FormatPrototype.factory;
Element equivalent = null;
Element deviceLayout = getContainingDeviceLayout(element);
if (deviceLayout != null) {
Element layout = deviceLayout.getParent();
Element newLayout = factory.element(layout.getName(),
layout.getNamespace());
Element newDeviceLayout = (Element) deviceLayout.clone();
// Put the new layout in a document to allow absolute XPaths
// to operate correctly
factory.document(newLayout);
// Put the cloned device layout into the new layout
newLayout.addContent(newDeviceLayout);
// Locate the equivalent element in the clone to that