I am getting Error: Invalid XSD schema error while running this error. What is the actual issue, I am unable to find it.
var libxml = require("libxmljs");
var fs = require('fs');
var xsd = fs.readFileSync('D:/XML_validation/JATS-Publishing-1-3-MathML3-XSD/JATS-journalpublishing1-3-mathml3.xsd','utf8');
var xml_valid = fs.readFileSync('2100.xml','utf8');
var xsdDoc = libxml.parseXml(xsd);
var xmlDocValid = libxml.parseXml(xml_valid);
var result = xmlDocValid.validate(xsdDoc);
console.log(result);
With Saxon, parsing the supplied URI https://jats.nlm.nih.gov/publishing/1.3/xsd/JATS-journalpublishing1-3-mathml3.xsd directly of the web, I get errors like
That's not an answer, but it's a data point that might help you find an answer - look at the
xs:include
andxs:import
directives.