You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Cezar Andrei <ce...@oracle.com> on 2014/03/18 00:43:33 UTC

Re: Duplicate complex types with mixed elements

Narayan,

It's probably a bug that the node1Type is not removed but this doesn't 
affect the rest since it's not used elsewhere.
As you can see in personType, node1 element is defined as mixed content.

Cezar


On 03/11/2014 12:20 AM, Parvatikar, Narayan wrote:
>
> 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:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema"elementFormDefault="qualified"attributeFormDefault="unqualified">
>
> <xs:elementname="person"type="personType"/>
>
> <xs:complexTypename="node1Type">
>
> <xs:sequence>
>
> <xs:elementname="name"type="xs:string"minOccurs="0"/>
>
> </xs:sequence>
>
> </xs:complexType>
>
> <xs:complexTypename="personType">
>
> <xs:sequence>
>
> <xs:elementname="node1"minOccurs="0"maxOccurs="unbounded">
>
> <xs:complexTypemixed="true">
>
> <xs:sequence>
>
> <xs:elementname="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
>