<?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-KSQA="http://docs.rackspace.com/identity/api/ext/RAX-KSQA/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-KSQA/v1.0">

     <!--Import schema we are extending -->
     <import namespace="http://docs.openstack.org/identity/api/v2.0"
          schemaLocation="credentials.xsd" />

     <!-- Elements -->
     <element name="secretQA" type="RAX-KSQA:SecretQA"
          substitutionGroup="identity:credential" />

     <!-- Complex Types -->
     <complexType name="SecretQA">
          <complexContent>
               <annotation>
                    <xsd:documentation xml:lang="EN"
                         xmlns="http://www.w3.org/1999/xhtml">
                         <p>
                              A Secret Question and Answer. The answer shall serve to prove
                              the user's identity as it should only be able to be answered
                              by the user who proposed the question.
                         </p>
                    </xsd:documentation>
                    <xsd:appinfo>
                         <xsdxt:samples>
                              <xsdxt:sample>
                                   <xsdxt:code type="application/xml" href="../samples/RAX-KSQA-secretQA.xml" />
                              </xsdxt:sample>
                              <xsdxt:sample>
                                   <xsdxt:code type="application/json" href="../samples/RAX-KSQA-secretQA.json" />
                              </xsdxt:sample>
                         </xsdxt:samples>
                    </xsd:appinfo>
               </annotation>
               <extension base="identity:CredentialType">
                    <attribute name="username" type="xsd:string" use="optional" />
                    <attribute name="question" type="xsd:string" use="optional" />
                    <attribute name="answer" type="xsd:string" use="optional" />
                    <anyAttribute namespace="##other" processContents="lax" />
               </extension>
          </complexContent>
     </complexType>

</schema>
