castor
  1. castor
  2. CASTOR-1674

invalid xsd schema generated from the instance

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 1.0.5
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Windows XP
    • Number of attachments :
      0

      Description

      when i give the following xml instance for converting using xmlInstance2schema generator
      <CONTACT>
      <NAME index="1">a</NAME>
      <DESCRIPTN>a</DESCRIPTN>
      <EMAIL>a</EMAIL>
      <FAX index="1">a</FAX>
      <NAME index="1">a</NAME>
      <TELEPHONE index="1">a</TELEPHONE>
      </CONTACT>

      the instance has NAME element repeated 2 times.
      to the schema

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="CONTACT">
      <xsd:complexType>
      <xsd:all>
      <xsd:element name="NAME" maxOccurs="unbounded">
      <xsd:complexType mixed="true">
      <xsd:sequence/>
      <xsd:attribute name="index" type="xsd:integer"/>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="DESCRIPTN" type="xsd:string"/>
      <xsd:element name="EMAIL" type="xsd:string"/>
      <xsd:element name="FAX">
      <xsd:complexType mixed="true">
      <xsd:sequence/>
      <xsd:attribute name="index" type="xsd:integer"/>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="TELEPHONE">
      <xsd:complexType mixed="true">
      <xsd:sequence/>
      <xsd:attribute name="index" type="xsd:integer"/>
      </xsd:complexType>
      </xsd:element>
      </xsd:all>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>

      the problem with the above schema is that all element cannot have a child element that can occur more than 1.
      when i use other tools like trang it is generating properly with have choice instead of the all element

        Issue Links

          Activity

          Hide
          Werner Guttmann added a comment -

          The same as CASTOR-1676.

          Show
          Werner Guttmann added a comment - The same as CASTOR-1676 .
          Hide
          Werner Guttmann added a comment -

          Bulk-closing all issues assigned to 1.0.5. Please feel free to re-open any of those when required.

          Show
          Werner Guttmann added a comment - Bulk-closing all issues assigned to 1.0.5. Please feel free to re-open any of those when required.

            People

            • Assignee:
              Werner Guttmann
              Reporter:
              iakishore
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: