Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-2003

XSD generator fails to properly generate the nested complex types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.17.2
    • Fix Version/s: 2.17.3, 18
    • Component/s: Documents

      Description

      When using nested complex types, XSD generated by Studio is not correct :

      A typical output would be

        <xs:complexType name="intcmn_sourceType">
          <xs:sequence>
            <xs:element name="audience" type="nxs:stringList"/>
            <xs:element name="date" type="xs:date"/>
            <xs:element name="geography" type="nxs:stringList"/>
            <xs:element name="sensitive" type="xs:boolean"/>
            <xs:element name="source_description" type="xs:string"/>
            <xs:element name="source_language" type="nxs:stringList"/>
            <xs:element name="source_name" type="xs:string"/>
            <xs:element name="url" type="xs:string"/>
            <xs:element name="source_eval" type="nxs:intcmn_source_evalType"/>
            <xs:complexType name="intcmn_source_evalType">
              <xs:sequence>
                <xs:element name="data_credibility" type="xs:string"/>
                <xs:element name="source_reliability" type="xs:string"/>
              </xs:sequence>
            </xs:complexType>
          </xs:sequence>
        </xs:complexType>
      

      where as a valid generation would be to make the sub type declaration "at root level"

        <xs:complexType name="intcmn_sourceType">
          <xs:sequence>
            <xs:element name="audience" type="nxs:stringList"/>
            <xs:element name="date" type="xs:date"/>
            <xs:element name="geography" type="nxs:stringList"/>
            <xs:element name="sensitive" type="xs:boolean"/>
            <xs:element name="source_description" type="xs:string"/>
            <xs:element name="source_language" type="nxs:stringList"/>
            <xs:element name="source_name" type="xs:string"/>
            <xs:element name="url" type="xs:string"/>
            <xs:element name="source_eval" type="nxs:intcmn_source_evalType"/>
          </xs:sequence>
        </xs:complexType>
        <xs:complexType name="intcmn_source_evalType">
              <xs:sequence>
                <xs:element name="data_credibility" type="xs:string"/>
                <xs:element name="source_reliability" type="xs:string"/>
              </xs:sequence>
        </xs:complexType>
      

      or make a real "inline" declaration

        <xs:complexType name="intcmn_sourceType">
          <xs:sequence>
            <xs:element name="audience" type="nxs:stringList"/>
            <xs:element name="date" type="xs:date"/>
            <xs:element name="geography" type="nxs:stringList"/>
            <xs:element name="sensitive" type="xs:boolean"/>
            <xs:element name="source_description" type="xs:string"/>
            <xs:element name="source_language" type="nxs:stringList"/>
            <xs:element name="source_name" type="xs:string"/>
            <xs:element name="url" type="xs:string"/>
            <xs:element name="source_eval" type="nxs:intcmn_source_evalType">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="data_credibility" type="xs:string"/>
                  <xs:element name="source_reliability" type="xs:string"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: