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
> 

Reply via email to