<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>


<schema
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
    xmlns:RAX-KSGRP="http://docs.rackspace.com/identity/api/ext/RAX-KSGRP/v1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
    xmlns:atom="http://www.w3.org/2005/Atom"
    targetNamespace="http://docs.rackspace.com/identity/api/ext/RAX-KSGRP/v1.0"
>
    <!--Import schema we are extending -->
    <import namespace="http://docs.openstack.org/identity/api/v2.0"
        schemaLocation="token.xsd"/>

    <import namespace="http://docs.openstack.org/identity/api/v2.0"
        schemaLocation="api.xsd" />
    
    
    <element name="groups" type="RAX-KSGRP:Groups"/>
    
    <complexType name="Groups">
        <sequence>
            <element name="group" type="RAX-KSGRP:Group" maxOccurs="100"/>
            <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
        <anyAttribute namespace="##other" processContents="lax"/>
    </complexType>
    
    <complexType name="Group">
        <sequence>
            <element name="description" type="xsd:string" maxOccurs="1"/>
            <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
        <attribute name="id" type="xsd:string" use="required"/>
        <attribute name="name" type="xsd:string" use="optional"/>
        <anyAttribute namespace="##other" processContents="lax"/>
    </complexType>

    <complexType name="TenantGroup">
        <complexContent>
            <extension base="RAX-KSGRP:Group">
                <attribute name="tenantId" type="xsd:string"  use="required"/>
            </extension>
        </complexContent>
    </complexType>
</schema>

