Updated the writing of the ISO metadata XML file, so that the structure validates against the XML schema (currently only without the namespaces).