i am not sure about validation. eventually we probably should have an xml schema for this. some places do validate, others seem to do too careful `isset` things that end up in invalid metadata. it will be detected later but with less understandable errors than if we would report that here.