Hi ,

I am trying to generate a xsd from a sample xml which looks like below,

<?xml version="1.0" encoding="UTF-8"?>
<person>
<node1> text </node1>
<node1> <name> john </name> </node1>
</person>

Here node1 is mixed element.

But there are two definitions seen for the node1 in xsd.
One is global complex type and other is complex type defined inline ( Check 
below )


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified" attributeFormDefault="unqualified">
            <xs:element name="person" type="personType"/>
            <xs:complexType name="node1Type">
                        <xs:sequence>
                                    <xs:element name="name" type="xs:string" 
minOccurs="0"/>
                        </xs:sequence>
            </xs:complexType>
            <xs:complexType name="personType">
                        <xs:sequence>
                                    <xs:element name="node1" minOccurs="0" 
maxOccurs="unbounded">
                                                <xs:complexType mixed="true">
                                                            <xs:sequence>
                                                                        
<xs:element name="name" type="xs:string" minOccurs="0"/>
                                                            </xs:sequence>
                                                </xs:complexType>
                                    </xs:element>
                        </xs:sequence>
            </xs:complexType>
</xs:schema>

I am using RussianDoll Strategy for generating this . Do we know any solution 
to fix this ?


Thanks
Narayan

Reply via email to