http://answers.nuxeo.com/questions/7408/bug-nuxeo-studio-generating-syntactically-invalid-schema-for-nested-complex-types
Schema generated by studio may be invalid, nesting <complexType> within <sequence>. A walk around is provided.
Level of nested complexity is limited. Complex type in type is ok. Over that there is error.