EBUCore: failed to load external entity "https://..."
Posted: Tue Sep 27, 2016 10:10 pm
[PROBLEM]
When trying to validate an EBUCore XML against the specification's XSD from EBU, one might run into the following error messages:
[SOLUTION]
Fortunately, all external files referenced inside ebucore.xsd can also be accessed over unencrypted HTTP.
Therefore, simply copy "ebucore.xsd" to "ebucore-http.xsd" and search/replace "https://" with "http://"
Then, use the "ebucore-http.xsd" to perform the validation:
Of course, it's good practice to use https:// these days, but until every tool supports it, this workaround might help developers producing proper, validated EBUCore XMLs 
When trying to validate an EBUCore XML against the specification's XSD from EBU, one might run into the following error messages:
Although it seems like a lot of errors, the actual problem is that the EBUCore XSD contains "https://" links - and many XSD validators (such as xmllint) are currently not supporting the SSL protocol.warning: failed to load external entity "https://www.ebu.ch/metadata/schemas/EBUCore/xml.xsd"
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:6: element import: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'https://www.ebu.ch/metadata/schemas/EBUCore/xml.xsd'. Skipping the import.
warning: failed to load external entity "https://www.ebu.ch/metadata/schemas/EBU ... 021212.xsd"
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:8: element import: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'https://www.ebu.ch/metadata/schemas/EBU ... 021212.xsd'. Skipping the import.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:130: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:278: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}source' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:686: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}title' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:742: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}title' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:811: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}identifier' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:858: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}subject' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:911: element element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}type' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsdelement element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}description' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsdelement element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}coverage' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsdelement element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}rights' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsdelement element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}relation' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsdelement element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}language' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsdelement element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}date' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsdelement element: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value '{http://purl.org/dc/elements/1.1/}format' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:5932: element complexType: Schemas parser error : complex type 'elementType', attribute 'base': The QName value '{http://purl.org/dc/elements/1.1/}elementType' does not resolve to a(n) simple type definition.
WXS schema ../../../Papers-Specs/XSDs/ebucore_1.6.xsd failed to compile
[SOLUTION]
Fortunately, all external files referenced inside ebucore.xsd can also be accessed over unencrypted HTTP.
Therefore, simply copy "ebucore.xsd" to "ebucore-http.xsd" and search/replace "https://" with "http://"
Then, use the "ebucore-http.xsd" to perform the validation:
Code: Select all
$ xmllint --noout --schema ebucore-http.xsd my-ebucore-output.xml
