Skip to content

Understanding Generation Bug - xs:Sequence order with FSM #73

@aitee

Description

@aitee

I'm trying to understand is why the schema order isn't being respected when adding a new (and first) object whose type is defined within a sequence. For simple handwritten schemas the order is respected (and the generated code is quite a bit different).

In a schema xsd, when I have sequence:
https://github.com/com-pas/compas-scl-xsd/blob/develop/src/main/resources/xsd/SCL2007B/SCL_IED.xsd#L323 (DataSet comes before DOI)
https://github.com/com-pas/compas-scl-xsd/blob/develop/src/main/resources/xsd/SCL2007B/SCL_IED.xsd#L365 (GSEControl comes before SettingControl, but after DataSet)

Is it expected to have a contentModel assignment (contentModel = new SequenceContentModelEntity) in the static constructor (this is what I see in the handwritten/simple schema)? But for complex schemas, I instead see InitFSM() in its place.

Is this InitFSM() code expected to handle order when setting an object that isn't yet represented in the XML DOM (i.e. a new object that needs to be placed based on the sequence order defined in the schema)?

I am using XObjects Core version 3.3.0 (because I have been having other issues with later versions).

Any insight on how/when contentModel is generated versus the InitFSM case and how their responsibilities relate to ordering objects added would help me better understand where the issue could lie.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions