DDEX develops standards for the electronic communication of music-related metadata using, to the most part, messages. One step in verifying that a message has been created in accordance with the standard is “validation”.
For those DDEX standards based on XML – i.e. ERN, MLC, RIN, MWL, MWN, LoD and others – off-the-shelf XML tools can be used to help with validation. For the flat file standards (DSR and, soon, CDM) DDEX members have created tools.
This article provides some guidance on how to validate DDEX messages.
DDEX has published two XML Schema Definition (XSD) files for each standard: one that defines the structure of the messages that can be created for that standard and a second one that defines all the allowed-values for the DDEX standards. These two files are sometimes referred to as the “message XSD” and “AVS XSD”.
The message XSD loads the AVS XSD to making AVS validation an integral part of the message validation.
The XSDs are published in two versions and locations: The “online versions” are published on a web server at the URL indicated by the namespace of the message. The XSD for Version 3.8.2 of the ERN standard, which has a namespace of http://ddex.net/xml/ern/382, is published on the DDEX website at http://ddex.net/xml/ern/382/release-notification.xsd. The online version of the message XSD then imports the online version of the AVS XSD, which is located at http://ddex.net/xml/avs/avs_20161006.xsd for ERN 3.8.2. Implementers and users can use the online versions of the XSDs for their applications as well as for their production system.
The XSDs are also published on the knowledge base for downloading and for local, offline, use. All XML standards’ web pages display a box such as the one shown overleaf, which allows to download the XSD files in a zip archive.
The offline message XSD loads the AVS XSD from the same zip archive (and not the online version discussed above), thus allowing to implement and use the XSDs without the need for an internet connection.
Other than referring to the offline AVS XSD there is no difference between the two sets of XSDs. While the examples below use the online XSD files, there is no material difference for users who wish to use the offline XSDs.
For the ERN standard, DDEX has also developed profiles that define constraints beyond those defined by the message and AVS XSDs. To support an automated checking whether an ERN message meets these profile constraints, DDEX has developed – but not published beyond its membership – ISO/Schematron rules.
A complete validation of an XML message created in accordance with a DDEX standard may therefore require two steps: XSD Validation and Schematron Validation.
Step 1 – XSD Validation
Step 2 – Profile Validation (ERN only)
The validation of a flat-file message such as a TSV file generated in accordance with the Digital Sales Reporting Message Suite Standard (DSR) can be conducted by a tool developed by Google. The tool is available to download from GitHub at https://github.com/ddexnet/dsrf.
The tool can be deployed on any computer running Max OS X, LinuX or MS Windows with a Python v2.7 (or later) interpreter installed. The tool comes with a manual and can be used with a small Perl script dsrf-conf.plas follows:
The two screen shots below show a successful and an unsuccessful test. In each case, a log file containing all findings is generated. The script is provided in Annex A.
Perl Script for DSRF Validator
 At least for comparatively recent versions of the DDEX standards. For older versions there may be the possibility that the online AVS XSD has been updated since the offline XSD had been published.
 XmlSpy does not support Schematron validation out of the box. Adding Schematron capabilities to XmlSpy requires installing a plug-in.