Open khamyl opened 3 years ago
@khamyl Would you be able to share the error message that you receive from the console?
There are a number of test cases and schemas in this project that include abstract elements (for example schema_sub.xsd and dc.xsd).
Type references are supposed to be applied to element definitions, for example here in the schema_processor. Similarly, abstract elements are supposed to be excluded from appearing as children of other elements here.
It may not currently be able to handle an abstract element definition being referenced as the child of another element, such as in titleStmt
. I haven't tested this in a while, but based on skimming the implementation I would think that that child wouldn't show up at all, since I don't think the editor attempts to determine what subclasses of a definition inherit from an abstract reference like this.
Problem description
Is the editor dealing with abstract elements?
I have a quite complex XSD. I'll focus only to the problematic part of it.
The XML Schema
The XML instance
In the JSON generated by
xsd2json.js
script the<titleStmt>
element 2. child is referring to the abstract element. As a result therenderChild()
function is handling the<author>
element as "without the defiition":The questions are
xsd2json.js
)xml_element.js
)