Compared with XSD, RELAX NG does not support simpleType and complexType tags. However, you can build complex types by grouping the named patterns define and ref. For example, complexType studentRoll can be built using references to studentID and studentSSN:
<ref name="studentID "/>
<ref ssn="studentSSN "/>
By default, XSD defines the complex type elements in ordered sequence. XML tools on the market such as XMLSpy, 4Suite, and Stylus use the sequence tag to mandate that the elements within a complex type be ordered in sequence. As a result, though you define all the sub-elements, they must be in the order specified in the schema. This limits the full features of inheritance, because it restricts the definition of a subset of elements and what can be inherited from it. RELAX NG relaxes this restriction by providing the interleave tag:
The above schema specifies that the parentNames can be interleaved, so mother's name or the optional father's name need not follow the order specified in the schema.