Namespace and file locations for the XSD for allowed value sets

All DDEX XML Standards are expressed, besides the textual description, by an XML Schema Definition file (XSD). Each of these message XSD files is uniquely identified with a namespace in the form of a URI. For ERN 4.1.1 this namespace is http://ddex.net/xml/ern/411. The location from where the message XSD files can be downloaded from is closely related to the namespace. However, namespaces are just unique identifiers and must not be interpreted as resolvable web addresses. The web address for the XSD file for ERN 4.1.1, for instance, is http://ddex.net/xml/ern/411/release-notification.xsd.

Each of the message XSD files imports a further XSD file that provides all allowed values (AVSs, also known as code lists). Initially, DDEX only had one such allowed value XSD under the namespace http://ddex.net/xml/avs/avs since all standards shared a common set of allowed values. The file was available from http://ddex.net/xml/avs/avs.xsd. When the AVS XSD was updated, the location of the file changed to http://ddex.net/xml/avs/avs2.xsd,http://ddex.net/xml/avs/avs3.xsd, etc. The AVS namespace, however, remained.

Over time this changed and each standard (and also each version of a standard) has its own AVS XSD file. The content of these files are only those allowed value sets used by each individual standard: 

ERN 4.1.1, for example, uses the allowed values from http://ddex.net/xml/avs/avs411.xsd. This file nevertheless still carries the standard AVS XSD namespace of http://ddex.net/xml/avs/avs. This can be seen from ERN 4.1.1’s XSD file which contains the following:

<xs:schema xmlns:ern=http://ddex.net/xml/ern/411
  xmlns:avs=http://ddex.net/xml/avs/avs  
  xmlns:ds=http://www.w3.org/2000/09/xmldsig#
  xmlns:xs=http://www.w3.org/2001/XMLSchema
  targetNamespace=http://ddex.net/xml/ern/411
  elementFormDefault="unqualified"
  attributeFormDefault="unqualified">

<xs:import namespace=http://ddex.net/xml/avs/avs
  schemaLocation="http://ddex.net/xml/avs/avs411.xsd"/> 

The line “xmlns:avs=http://ddex.net/xml/avs/avs” defines the namespace for the file to be included and the tag “<xs:import namespace=”http://ddex.net/xml/avs/avs” schemaLocation="http://ddex.net/xml/avs/avs411.xsd"/>” tells the XML parser where to find the relevant XML Schema Definition file.

When handling these XML Schema Definition files, it is crucial to remember that the message XSDs specify the exact namespace and location of the XSD file for the included AVS XSD file. It is not valid to replace this file with any other file.