Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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 :
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
- duplicates
-
CASTOR-1676
Invalid schema generated with <xsd:all> containing element with maxOccurs unbounded value.
-
The same as CASTOR-1676.