Bug #4193
closedEE 9.9.1.2J: Generated SCM failed on XSD validation on "Invalid content was found starting with element '{"http://ns.saxonica.com/schema-component-model":default}'. One of '{"http://ns.saxonica.com/schema-component-model":fixed}' is expected."
100%
Description
Good afternoon,
I created SchemaComponentModel file from my XSD file "personal.xsd" using
java -cp ./bin/SaxonEE9-9-1-2J/saxon9ee.jar com.saxonica.Validate -xsd:"./data/personal.xsd" -export:"./data/personnel.flat.scm" -top:personnel
I validated SCM file "personnel.flat.scm" against the latest "scmschema.xsd", which I downloaded just now from Saxonica web site, using
java -cp ./bin/SaxonEE9-9-1-2J/saxon9ee.jar com.saxonica.Validate -s:"./data/personnel.flat.scm" -xsd:"./data/scmschema.xsd"
I got XSD validation errors:
Validation error on line 99 column 43 of personnel.flat.scm:
FORG0001: In content of element <attributeUse>: The content model does not allow element
<Q{http://ns.saxonica.com/schem...> to appear as the first child. Expected
<Q{http://ns.saxonica.com/schem...> or nothing.
See http://www.w3.org/TR/xmlschema-1/#cvc-complex-type clause 2.4
Validation error on line 144 column 45 of personnel.flat.scm:
FORG0001: In content of element <attributeUse>: The content model does not allow element
<Q{http://ns.saxonica.com/schem...> to appear as the first child. Expected
<Q{http://ns.saxonica.com/schem...> or nothing.
See http://www.w3.org/TR/xmlschema-1/#cvc-complex-type clause 2.4
Validation error on line 159 column 42 of personnel.flat.scm:
FORG0001: In content of element <attributeUse>: The content model does not allow element
<Q{http://ns.saxonica.com/schem...> to appear as the first child. Expected
<Q{http://ns.saxonica.com/schem...> or nothing.
See http://www.w3.org/TR/xmlschema-1/#cvc-complex-type clause 2.4
Validation error on line 307 column 14 of personnel.flat.scm:
FORG0001: Three validation errors were reported. First error: In content of element
<attributeUse>: The content model does not allow element
<Q{http://ns.saxonica.com/schem...> to appear as the first child. Expected
<Q{http://ns.saxonica.com/schem...> or nothing.
Validation of file ./data/personnel.flat.scm completed: errors found
When I validate it also in oXygen 21.0 Developer using even xsd version 1.1 and Xerces or built-in Saxon-EE 9.8.0.12, it looks like the error is in generated scm:default, which is not allowed here or at all instead of scm:fixed.
In fact, I do not need to validate SCM against its XSD at all, it is just my behavior to validate XML against its XSD when available. So I just want to ask You, if I can rely on this SCM in my further processing to my DomainSpecificLanguague (MS SpreadSheetML) usage. The "personal.xsd" is attached (it is built-in example file in the latest oXygen).
Regards, Stepan
Files
Related issues
Please register to edit this issue