Delivery rejections often arrive as a terse status line in a partner portal, long after the feed engineer has moved on to the next release. “Metadata invalid” says nothing about whether the fault sits in the XML, in the catalogue data, or in the agreement with the recipient, and those are three different jobs for three different people. A validator earns its place by telling you which one you are looking at.
A delivery file can pass XML and still fail
Typical causes: the partner’s rule set (its profile) requires a field the basic schema lets you leave out, the recipient rejects a territory code, or the rights details contradict each other even though each element is valid on its own.
Treat a DDEX ERN validator as a series of pre-delivery checks rather than one green tick. At minimum it must show that the message can be read, that it is valid for its ERN version, that it fits the agreed profile and that the receiving partner accepts it. Each layer has its own owner, so a failure that names its layer also names who should pick it up.
Every outgoing ERN needs a record of checks you can repeat before it reaches a distributor or streaming service. The record names the exact versions used, the test-file results and an owner for failures outside the message itself.
In practice those four questions split into six gates, and the first habit is to classify an error before fixing it. A missing closing tag and a missing commercial territory can both block delivery but need different responses.
| Validation gate | What it tests | Typical failure | Who usually fixes it |
|---|---|---|---|
| XML well-formedness | Legal XML syntax and encoding | Unclosed element, duplicate attribute, invalid character | Feed or engineering owner |
| XSD schema | ERN structure for the declared version | Element in wrong order, missing mandatory child | Feed or metadata engineering |
| Profile rules | Recipient’s permitted ERN subset | Profile-required identifier absent | Delivery operations and metadata owner |
| Controlled vocabulary | Approved codes and formats | Unsupported genre, territory, use type, or date format | Metadata operations |
| Business rules | Relationships that must make sense together | Deal refers to a resource absent from the release | Rights and delivery operations |
| Partner rules | Recipient-specific acceptance checks | DSP requires a local identifier or rejects a territory combination | Partner operations, sometimes the partner |
XML and XSD checks are purely technical: the same file always gives the same answer. Profile and business checks look at how the release, the recordings, the deal, the rights owner, the territory and the dates fit together. Partner rules may appear in onboarding documents, in a portal or only when a file is rejected.
Pin the contract before testing files
A result means nothing unless you know which rules (the contract) produced it. An ERN 4.3.2 message cannot be judged against an ERN 3.8.2 schema, and an internal profile may not match every recipient. Keep validation-contract.yml with each feed repository or pipeline.
For the fixture set below, the contract is explicit:
- Message standard: DDEX ERN 4.3.2, using that version’s own namespace and the complete XSD bundle supplied for it.
- Schema runner:
xmllintfrom libxml2 2.12.7 for XSD; Java 21.0.2 and Saxon-HE 12.4 for Schematron-derived profile checks. - Profile assumption: a label-to-distributor audio-release profile requiring one main release, at least one sound recording, a commercial deal, release and resource references, and ISO-style territory and language values.
- Local rule pack:
label-rules 1.3.0, covering identifier uniqueness, reference resolution, date ordering, territory intersections, and internal catalogue policy.
This is an example contract; plenty of partners will not support that ERN version or rule set. If a distributor asks for ERN 4.2, its own profile or a portal template, its rules win. Archive the schema and rule pack with a checksum or a fixed build reference. A log that only says “passed” is hard to check after an upgrade.
Keep synthetic-contribution disclosures in a separate metadata review stream; this guide covers generic delivery validation. For field context, see DDEX AI music metadata fields for independent labels.
Build fixtures that fail on purpose
Test validators with messages you break on purpose. One file that passes proves only that one release did not trigger an obvious error. A set of test files (fixtures) lets you see each layer work, and it stops later changes to mappings, schemas and code lists from quietly breaking things.
The anonymised baseline, release-valid-432.xml, describes one digital single, one primary sound recording, one contributing party, one label, and one commercial deal. Placeholder names use production-format identifiers. It has a stable ReleaseReference, matching recording ResourceReference, a deal pointing to the release, an availability date later than message creation, and territory and language values from pinned lists.
Do not treat a stripped XML snippet as proof of a valid ERN fixture: element order, wrappers, namespaces, and references are easily lost. Keep the complete baseline in source control and mutate that file. Record the expected outcomes alongside the XML:
| Fixture | Deliberate mutation | Expected gate | Captured result |
|---|---|---|---|
release-valid-432.xml |
None | All local gates | PASS: xml, xsd, profile, vocabulary, business |
broken-xml-unclosed-title.xml |
Closing DisplayTitleText removed |
XML | FAIL XML: Opening and ending tag mismatch |
broken-xsd-resource-order.xml |
ResourceReference moved after an element that must follow it |
XSD | FAIL XSD: Element ... is not expected |
broken-profile-missing-isrc.xml |
ISRC removed from a profile-required recording | Profile | FAIL PROFILE: recording identifier required |
broken-vocab-territory.xml |
Free-text territory instead of a code | Vocabulary | FAIL VOCAB: territory value not in pinned list |
broken-rule-orphan-deal.xml |
Deal references absent R99 in ReleaseList |
Business rule | FAIL RULE: DealReleaseReference does not resolve |
broken-partner-label-code.xml |
Partner-required label code empty | Partner rule | BLOCKED PARTNER: recipient rule requires label code |
This distinguishes “validated on my machine” from “passed agreed rules.” Failure-named fixtures also let an engineer changing the vocabulary parser confirm that invalid territories still fail.
Run validators in failure order
Run the cheap, clear-cut checks first. Broken XML cannot give you trustworthy schema or profile results. Fix schema errors before arguing about business meaning, because later checks may be reading an incomplete file.
A command-line preflight can be small when the pinned schema bundle, compiled profile stylesheet, and local rule pack are in the repository. The commands below assume the pinned schema bundle and local rule files are available. Treat the shown messages as expected output until you run and retain the fixture results.
# 1. Syntax and XSD structure
xmllint --noout \
--schema schemas/ern-4.3.2/ern-main.xsd \
fixtures/release-valid-432.xml
# release-valid-432.xml validates
# 2. Profile rules, emitted as SVRL
java -jar tools/saxon-he-12.4.jar \
-s:fixtures/release-valid-432.xml \
-xsl:rules/profile-432-label-distributor.xsl \
-o:out/release-valid-432.svrl
# failed-assert count: 0
# 3. Vocabulary and cross-reference rules
node tools/validate-ern-rules.mjs \
--contract validation-contract.yml \
--file fixtures/release-valid-432.xml
# PASS vocabulary=0-errors references=0-errors business=0-errors
For broken-rule-orphan-deal.xml, do not report a schema defect. Its final line should be FAIL business E-BR-014: DealReleaseReference R99 has no matching ReleaseReference, directing the editor to correct the deal reference or add the intended release rather than inspect namespaces.
In a portal workflow, preserve the sequence: select ERN version, upload, run schema validation, select recipient profile, then save or export the report. Record the displayed portal rule-set date. Screenshots help setup, but a text log with input filename, result, validator version, and timestamp is easier to compare.
Schema-valid is not delivery-ready
An XSD defines which document shapes are legal. Commercial agreements, recipient conventions, and policy decisions sit outside it.
A single can have one recording, one deal, valid XML, an identifier and a deal pointing to a real release, and still fail. The distributor may require its own label code, may not support the territory, or may reject the release dates under its intake rules. ERN has not failed; the recipient simply adds rules beyond the basic schema.
Do not build every partner’s conditions into one shared ERN converter. That makes a feed that fits one destination and breaks for another. Keep your main catalogue mapping separate from small add-ons for each recipient. Shared checks cover references, stable identifiers, dates that make sense, code-list values and a release, recordings and deal that fit together. Give each recipient check a name and a version, and switch it on only for that recipient.
Choose tools by the rule layer
No single tool can responsibly validate every aspect of an ERN delivery. Ask which tool owns a failure type and whether its result is reproducible.
An XML parser catches typing errors in the markup; an XSD processor checks structure. Schematron, or similar logic, checks profile rules that span the whole file, such as an ISRC the profile requires. A code-list checker should say which list and version it used. Your own business-rule script can check references and compare dates once the file is loaded. Partner portals remain necessary where rules are private or change without a public machine-readable package.
A small label can use a simple script with saved test files and a manual portal step. A larger operation can use automated build checks (CI) to block a delivery and send clear errors to the metadata team. Useful output says what kind of error it is, where it is, which rule failed and how to fix it.
Avoid tools that hide the ERN version, silently normalise invalid values, or return one generic failure for all layers. Silent correction may suit whitespace or encoding but is dangerous for identifiers, rights dates, territories, and deal relationships. State every change and retain the original submitted message.
Public checks end before DSP acceptance
Public XSD bundles, profile specifications, and third-party validators provide confidence but cannot promise every DSP’s acceptance. DSP rules can add code lists, mandatory identifiers, audio-asset requirements, territorial policies, editorial constraints, ingestion schedules, and account-level configuration.
Turn every rejection into a new test. Sort it first. XML or XSD failures need a fix to the shared converter or a test file. Profile failures need an update to that recipient’s contract. Conditions that only one recipient has need a partner-rule test, plus a note on whether the rule is fixed, optional or only for some kinds of catalogue. Do not turn a one-off portal issue into a universal ERN rule without evidence.
Automation can confirm that a contributor reference resolves and that dates fall in order. Whether the contributor data is contractually correct, or who wins a rights dispute, is beyond its reach. Validation reduces preventable format and consistency errors but does not replace rights review, commercial approval, or final partner ingestion.
Make preflight part of release operations
Run preflight before a release is urgent: when a catalogue record becomes a delivery candidate, and again after changes to rights, identifiers, dates, track order, or territory. A file generated weeks earlier may no longer match the active recipient contract.
Use this handoff checklist:
- Confirm recipient route, ERN version, schema bundle, and profile version.
- Generate ERN from the approved catalogue snapshot and retain its source revision.
- Run XML, XSD, profile, vocabulary, and business checks in that order.
- Save fixture or pipeline output with rule IDs, not only pass/fail.
- Run partner or portal validation and attach any recipient report to the release record.
- Turn recurring rejection patterns into a named fixture before the next delivery.
Step six is the one that compounds. Every rejection turned into a named fixture is a failure the queue will not show twice, and after a few release cycles the fixture folder describes a team’s real partner rules better than any onboarding document. A larger validator cannot build that record for you; it comes from explaining each queue failure and reproducing it from a pinned contract.
