fullstack-lang / gongxsd

MIT License
0 stars 0 forks source link

REQIF : TARGET is not compiled to a field #12

Closed thomaspeugeot closed 2 months ago

thomaspeugeot commented 3 months ago

Very important field TARGET is missing from SPEC_RELATION

  <xsd:complexType name="SPEC-RELATION">
...
      <xsd:element maxOccurs="1" minOccurs="1" name="TARGET">
        <xsd:complexType>
          <xsd:choice maxOccurs="1" minOccurs="1">
            <xsd:element name="SPEC-OBJECT-REF" type="REQIF:GLOBAL-REF" />
          </xsd:choice>
        </xsd:complexType>
      </xsd:element>

field before and after are generated

    // generated from anonymous type within outer element "SOURCE" of type A_SOURCE.
    SOURCE []*A_SOURCE `xml:"SOURCE,omitempty"`

    // generated from anonymous type within outer element "TYPE" of type A_SPEC-RELATION-TYPE-REF.
    TYPE []*A_SPEC_RELATION_TYPE_REF `xml:"TYPE,omitempty"`
thomaspeugeot commented 2 months ago

Analysis:

Read the xsd.

SPEC-RELATION

SPEC-RELATION_A_ ... There is no TARGET Element in the stack. Probably during the PostProcessing step
thomaspeugeot commented 2 months ago

OK, understood, the factoring of elements is too strong. TARGET and SOURCE have the same complex type, therefore, the factoring must merge them.