While CMSIS standard defines the format for the SVD files, it also comes with tools to check the validity SVD files.
Validator can be fetched from the official CMSIS' devtools repository and the CMSIS-SVD schema validation specification can be found from ARM's CMSIS_5 repository under CMSIS/Utilities/CMSIS-SVD.xsd.
Having valid SVD files as source can reduce the burden of inventing hacks in tooling using SVD's as source of thruth.
Also, it's possible to check validity of SVD files using xmllint from libxml2 package on most Linux distributions:
xmllint --noout --schema CMSIS-SVD.xsd nrf-random-file.svd