node-xsd-schema-validator icon indicating copy to clipboard operation
node-xsd-schema-validator copied to clipboard

WITH_ERRORS result

Open token97 opened this issue 11 years ago • 1 comments

hey. i try to use your validator, but for each test i always get the same response : { valid: false, result: 'WITH_ERRORS', messages: [] } even if the xml is valid (I test on several online xml validator).

var xmlStr = '<?xml version="1.0"?><comment><author rel="nofollow" target="_blank">author</author><content>nothing</content></comment>';

validator.validateXML(xmlStr , schemaPath , function(err, result) {
                console.log(result);
                if (err) {
                    throw err;
                }
                result.valid; // true
            });

this is the shema content (replacing "()" by "<>"):

 (xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema")(xs:element name="comment")(xs:complexType)(xs:all)(xs:element name="author" type="xs:string"/)(xs:element name="content" type="xs:string"/)(/xs:all)(/xs:complexType)(/xs:element)(/xs:schema)

Same issue when I'm using examples into validatorSpec with BPMN20.xsd...

token97 avatar Apr 20 '15 08:04 token97

What is your java / nodejs runtime / operating system version?

Does the test suite (grunt test) pass for you?

nikku avatar Apr 20 '15 15:04 nikku