Project

Profile

Help

Bug #4193

EE 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."

Added by Stepan RYBAR 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2019-04-08
Due date:
% Done:

100%

Legacy ID:
Applies to branch:
9.9
Fix Committed on Branch:
9.9
Fixed in Maintenance Release:

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

personal.xsd (5.16 KB) Stepan RYBAR, 2019-04-08 16:16 personal.xsd

Related issues

Related to Saxon - Bug #3711: SCM: inadequate representation of value constraints Closed 2018-03-02 Actions

History

#1 Updated by Michael Kay 5 months ago

We made some extensions to the SCM format in 9.9 to handle fixed/default constraints better. I know that the XSD-for-SCM was updated to reflect the changes, but it looks as if the build/release process didn't pick up the new version.

#2 Updated by Michael Kay 5 months ago

Note, the SCM changes that caused this are described here:

https://saxonica.plan.io/issues/3711

#3 Updated by Michael Kay 5 months ago

  • Related to Bug #3711: SCM: inadequate representation of value constraints added

#4 Updated by Michael Kay 5 months ago

I have confirmed that the file in samples/scm/scmschema.xsd (and similarly the .scm version) in the saxon-resources download is not the same as the version in our current repository. I haven't yet established why.

#5 Updated by Michael Kay 5 months ago

It seems that the changes were simply never committed.

#6 Updated by Debbie Lockett 3 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Fix Committed on Branch 9.9 added
  • Fixed in Maintenance Release 9.9.1.4 added

9.9 saxon-resources download updated with 9.9.1.4 maintenance release (2019-06-28). See http://saxonica.com/download/download_page.xml for download link.

Please register to edit this issue

Also available in: Atom PDF