Conformance to the XSD file
Ensuring that the structure of the XML file conforms to the XML Schema Definition file for a particular standard will vary from platform to platform. The examples below explain conformance using three such platfgorms. Although the examples use the online XSD files, there would be no material difference for users who wish to use the offline XSDs (as explained here).
This can be done in an XML editor such as Syncro Soft’s Oxygen or Altova’s XmlSpy. Other equivalent tools are available. The screenshot below shows a valid ERN message in accordance with Version 4.1. From this screenshot it can be seen that:
The namespace of the message is
The location for the XSD for this namespace is
The button to trigger the validation, if not done automatically, is the document icon with the large red check mark; and
The green square in the top right corner indicates that the file is valid.
This validation also includes the validation of the allowed values. This can be done by opening the ERN XSD and finding a HTTP based AVS schema location:
Any errors found by the tool will be highlighted and will enable the user to go to the location of the error.
It is also possible to validate the XML file with a command line tool. For UNIX systems this can be done using
xmllint --noout –schema release-notifocation.xsd Audio.xml
xmllint prints out a status (e.g. "
Audio.xml is valid") and returns an error code to enable it to be used as part of a larger application.
For Windows systems validation can be done using a script for the Microsoft PowerShell available at https://gallery.technet.microsoft.com/scriptcenter/2f6f0541-d152-4474-a8c1-b441d7424454 or by using AltovaXML Community Edition 2013. While Altova no longer supports the 2013 edition of its XML Community Edition, it is still available to download from http://www.softpedia.com/get/Internet/Other-Internet-Related/AltovaXML.shtml.