Circular references?

I am trying to define a simple schema that contains a “circular” reference and need some advice. I think this is a fairly standard situation.

I have a list of users who belong to user groups. So I envision two doc-types in my schema - user and user-group. A user may belong to many user-groups and a user-group contains many users. How would I define my schema?

Here is a sample schema that I would have thought should work. Tamino won’t let me define this because of the ordering (“missing node reference” error) but there is no way to fix this. What to do?

Schema:
<?xml version = "1.0" encoding = "US-ASCII"?>
<xs:schema xmlns:xs = “XML Schema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “test”>
<tsd:doctype name = “user-group-role”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
<tsd:doctype name = “user”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
<xs:element name = “user”>
xs:complexType
xs:sequence
<xs:element name = “user-group-role_obj_id” type = “xs:string” minOccurs = “0” maxOccurs = “unbounded”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:objectRef
tsd:dereference</tsd:dereference>
<tsd:accessPredicate operator = “=”>
tsd:nodeRef/user-group-role/@ID</tsd:nodeRef>
</tsd:accessPredicate>
</tsd:objectRef>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name = “userid” type = “xs:string”></xs:attribute>
<xs:attribute name = “password” type = “xs:string”></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name = “user-group-role”>
xs:complexType
xs:sequence
<xs:element name = “user_obj_id” type = “xs:string” minOccurs = “0” maxOccurs = “unbounded”>
xs:annotation
xs:appinfo
tsd:elementInfo
tsd:physical
tsd:native
tsd:objectRef
tsd:dereference</tsd:dereference>
<tsd:accessPredicate operator = “=”>
tsd:nodeRef/user/@ID</tsd:nodeRef>
</tsd:accessPredicate>
</tsd:objectRef>
</tsd:native>
</tsd:physical>
</tsd:elementInfo>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name = “group_name” type = “xs:string”></xs:attribute>
</xs:complexType>
</xs:element>

Ooops. Wrong forum. I will repost to the Schema discussion… Sorry.