Skip to content

Meaning of 'Schemas validation error' #31

@paulhiggs

Description

@paulhiggs

I am trying to use xmllint to validate an XML document against a set of schemas and get the following error:

{
  errors: [
    "file_0.xml:26: element ServiceList: Schemas validity error : Element '{urn:dvb:metadata:servicediscovery:2019}ServiceList': No matching global declaration available for the validation root."
  ]
}

Line 26 of the XML document is

<ServiceList xmlns="urn:dvb:metadata:servicediscovery:2019" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tva="urn:tva:metadata:2019" version="191126165755" xsi:schemaLocation="urn:dvb:metadata:servicediscovery:2019 dvbi_v1.0.xsd">

and the node/express code being used is

console.log(xmllint.validateXML({
	xml: fs.readFileSync(path.join('sample','ASTRA_19_2_E.xml')).toString(),
	schema: [fs.readFileSync(path.join('schema','dvbi_v1.0.xsd')).toString(), 
			 fs.readFileSync(path.join('schema','tva_metadata_3-1.xsd')).toString(), 
			 fs.readFileSync(path.join('schema','tva_mpeg7.xsd')).toString(),
			 fs.readFileSync(path.join('schema','xml.xsd')).toString()]
}));

the "sample" files can be found in https://github.com/paulhiggs/dvb-sl-check/tree/master/sample
the "schema" files can be found in https://github.com/paulhiggs/dvb-sl-check/tree/master/schema

The XML document validates OK with XMLspy 2019

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions