As both of your 'Element' elements have an anonymous complex type
definitions, I guess this will not be achievable per se. If you
refactored your schema to have one (global) complex type definition, and
then refer to this complex type in your element defs, your goal is
achievable.

Werner

Thibaudeau, Andrew wrote:
> 
> I'm trying to generate beans from a schema where the elements of the
> same name have a parent / child relationship.  I want to generate one
> bean for the element, but have a reference with in the bean to a bean of
> the exact same type.  I know I can use a binding file when generating
> the beans, but that will create an identical bean with a different
> name.  Here is my current schema:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>   <element name="ElementRules">
>     <complexType>
>       <sequence>
>         <element name="Element" maxOccurs="unbounded">
>           <complexType>
>             <sequence>
>               <element name="Type" type="string"/>
>               <element name="Rule" maxOccurs="unbounded">
>                 <complexType>
>                   <sequence>
>                     <element name="Status" type="string"/>
>                     <element name="Condition">
>                       <complexType>
>                         <sequence>
>                           <element name="Attribute" type="string"/>
>                           <element name="Operator" type="string"/>
>                           <element name="Argument" type="integer"/>
>                           <element name="ConditionType" type="string"/>
>                         </sequence>
>                       </complexType>
>                     </element>
>                   </sequence>
>                 </complexType>
>               </element>
>               <element name="Element" maxOccurs="unbounded">
>                 <complexType>
>                   <sequence>
>                     <element name="Type" type="string"/>
>                     <element name="Rule" maxOccurs="unbounded">
>                       <complexType>
>                         <sequence>
>                           <element name="Status" type="string"/>
>                           <element name="Condition">
>                             <complexType>
>                               <sequence>
>                                 <element name="Attribute" type="string"/>
>                                 <element name="Operator" type="string"/>
>                                 <element name="Argument" type="integer"/>
>                                 <element name="ConditionType"
> type="string"/>
>                               </sequence>
>                             </complexType>
>                           </element>
>                         </sequence>
>                       </complexType>
>                     </element>
>                   </sequence>
>                 </complexType>
>               </element>
>             </sequence>
>           </complexType>
>         </element>
>       </sequence>
>     </complexType>
>   </element>
> </schema>
> 
> 
>       Andrew P. Thibaudeau
> 


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to