EBUCore: failed to load external entity "https://..."

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

EBUCore: failed to load external entity "https://..."

Post by peter_b »

[PROBLEM]
When trying to validate an EBUCore XML against the specification's XSD from EBU, one might run into the following error messages:
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.xsd:1093: 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/}description' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:1167: 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/}coverage' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:1338: 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/}rights' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:1508: 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/}relation' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:1554: 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/}language' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:1588: 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/}date' does not resolve to a(n) element declaration.
../../../Papers-Specs/XSDs/ebucore_1.6.xsd:1974: 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/}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
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.

[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
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 :D
Post Reply