void (final MyElement element, final String foo, final String bar) { final DomFileDescription description = getDomManager().getDomFileDescription(element.getXmlElement()); description.registerNamespacePolicy("foo", foo); description.registerNamespacePolicy("bar", bar); }