rootElement.setAttribute( "schemaLocation", "http://maven.apache.org/POM/" + modelVersion
+ " http://maven.apache.org/maven-v" + modelVersion.replace( '.', '_' ) + ".xsd", xsiNamespace );
}
// the empty namespace is considered equal to the POM namespace, so match them up to avoid extra xmlns=""
ElementFilter elementFilter = new ElementFilter( Namespace.getNamespace( "" ) );
for ( Iterator i = rootElement.getDescendants( elementFilter ); i.hasNext(); )
{
Element e = (Element) i.next();
e.setNamespace( pomNamespace );
}