The SP has an issue (
SSPCPP-684) with metadata containing a CR character. These can only appear in XML documents as the result of a sequence, and bad serialisation in the Xerces library means that the document can't be round tripped.
While this will be fixed in Xerces or the SP at some point, and eventually people will upgrade to a version where this doesn't apply, federations can make use of an MDA stage to detect metadata containing this value so that it can be flagged up or rejected.
I have code to implement this as part of the ukf-mda project that can be pulled in for this.