aadhar auth XML validation with XSD
<p>I am trying to validate the sample Auth XML with XSD which is provided by aadhar developer portal but getting error:</p>

<pre><code>Type 'http://www.uidai.gov.in/authentication/common/types/1.0:uid' is not declared, or is not a simple type)
</code></pre>

<p>but in auth XML I have specified <code>uid</code> element .</p>

<p>Auth XML : </p>

<pre><code>&lt;Auth xmlns="http://www.uidai.gov.in/authentication/uid-ath-request/1.0" ac="public" lk="MBFWjkJHNF-fLidl8oOHtUwgL5p1ZjDbWrqsMEVEJLVEDpnlNj_CZTg" sa="public" tid="public" uid="999991260711" ver="1.6" txn="AuthDemoClient:public:20160701120821"&gt;
&lt;Uses pi="y" pa="n" pfa="n" bio="n" pin="n" otp="n" /&gt;
 &lt;Meta udc="UIDAI:SampleClient" fdc="NA" idc="NA" pip="127.0.0.1" lot="P" lov="110002" /&gt;
&lt;Skey ci="20200916"&gt;&lt;/Skey&gt;
&lt;Data type="X"&gt;&lt;/Data&gt;
&lt;Hmac&gt;&lt;/Hmac&gt;
&lt;/Auth&gt;
</code></pre>

<p>auth XSD : </p>

<pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.uidai.gov.in/authentication/uid-auth-request/1.0"
    xmlns:tns="http://www.uidai.gov.in/authentication/uid-auth-request/1.0"
    elementFormDefault="qualified"
    xmlns:ar="http://www.uidai.gov.in/authentication/uid-auth-request-data/1.0"
    xmlns:common="http://www.uidai.gov.in/authentication/common/types/1.0"&gt;

    &lt;xs:import namespace="http://www.uidai.gov.in/authentication/common/types/1.0"
        schemaLocation="common-types.xsd" /&gt;

    &lt;xs:simpleType name="TknType"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:enumeration value="001"&gt;
                &lt;xs:annotation&gt;
                    &lt;xs:documentation&gt;Mobile number&lt;/xs:documentation&gt;
                &lt;/xs:annotation&gt;
            &lt;/xs:enumeration&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="TknValue"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:maxLength value="100"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:complexType name="Tkn"&gt;
        &lt;xs:attribute name="type" type="tns:TknType"&gt;&lt;/xs:attribute&gt;
        &lt;xs:attribute name="value" type="tns:TknValue"&gt;&lt;/xs:attribute&gt;
    &lt;/xs:complexType&gt;


    &lt;xs:simpleType name="UsesFlag"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:enumeration value="y"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="n"&gt;&lt;/xs:enumeration&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:complexType name="Uses"&gt;
        &lt;xs:attribute name="pi" use="required" type="tns:UsesFlag" /&gt;
        &lt;xs:attribute name="pa" use="required" type="tns:UsesFlag" /&gt;
        &lt;xs:attribute name="pfa" use="required" type="tns:UsesFlag" /&gt;
        &lt;xs:attribute name="bio" use="required" type="tns:UsesFlag" /&gt;
        &lt;xs:attribute name="bt" type="xs:string" /&gt;
        &lt;xs:attribute name="pin" use="required" type="tns:UsesFlag" /&gt;
        &lt;xs:attribute name="otp" use="required" type="tns:UsesFlag" /&gt;
    &lt;/xs:complexType&gt;

    &lt;xs:complexType name="Skey"&gt;
        &lt;xs:simpleContent&gt;
            &lt;xs:extension base="xs:base64Binary"&gt;
                &lt;xs:attribute name="ci" type="xs:string"&gt;
                    &lt;xs:annotation&gt;
                        &lt;xs:documentation&gt;
                            Certificate identifier - should be expiry date of certificate in YYYYMMDD format
                        &lt;/xs:documentation&gt;
                    &lt;/xs:annotation&gt;
                &lt;/xs:attribute&gt;
                &lt;xs:attribute name="ki" type="xs:string" use="optional"&gt;
                    &lt;xs:annotation&gt;
                        &lt;xs:documentation&gt;
                            Unique key identifier
                        &lt;/xs:documentation&gt;
                    &lt;/xs:annotation&gt;
                &lt;/xs:attribute&gt;
            &lt;/xs:extension&gt;
        &lt;/xs:simpleContent&gt;
    &lt;/xs:complexType&gt;


    &lt;xs:simpleType name="DataType"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:enumeration value="X"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="P"&gt;&lt;/xs:enumeration&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:complexType name="Auth"&gt;
        &lt;xs:sequence&gt;
            &lt;xs:element name="Tkn" type="tns:Tkn" minOccurs="0" /&gt;
            &lt;xs:element name="Uses" type="tns:Uses" /&gt;
            &lt;xs:element name="Meta" type="common:Meta" /&gt;
            &lt;xs:element name="Skey" type="tns:Skey" /&gt;
            &lt;xs:element name="Data" &gt;
                &lt;xs:complexType&gt;
                    &lt;xs:simpleContent&gt;
                        &lt;xs:extension base="xs:base64Binary"&gt;
                            &lt;xs:attribute name="type" type="tns:DataType" default="X" /&gt;
                        &lt;/xs:extension&gt;
                    &lt;/xs:simpleContent&gt;
                &lt;/xs:complexType&gt;
            &lt;/xs:element&gt;
            &lt;xs:element name="Hmac" type="xs:base64Binary" /&gt;
        &lt;/xs:sequence&gt;

        &lt;xs:attribute name="uid" type="common:uid" use="required" /&gt;
        &lt;xs:attribute name="ac" type="common:AuaCode" use="required" /&gt;
        &lt;xs:attribute name="tid" type="common:Tid" use="required" /&gt;
        &lt;xs:attribute name="ver" type="common:Ver" /&gt;
        &lt;xs:attribute name="txn" type="common:Txn" use="required" /&gt;
        &lt;xs:attribute name="lk" type="common:LicenseKey" use="required" /&gt;
        &lt;xs:attribute name="sa" type="common:AuaCode" use="required" /&gt;
    &lt;/xs:complexType&gt;

    &lt;xs:element name="Auth" type="tns:Auth"&gt;&lt;/xs:element&gt;
&lt;/xs:schema&gt;
</code></pre>

<p>common-types.xsd</p>

<pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.uidai.gov.in/authentication/common/types/1.0"
    xmlns:tns="http://www.uidai.gov.in/authentication/common/types/1.0"
    elementFormDefault="qualified"&gt;

    &lt;xs:simpleType name="uid"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:pattern value="\d{12}"&gt;&lt;/xs:pattern&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="pin"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:pattern value="\d{6}"&gt;&lt;/xs:pattern&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="otp"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:pattern value="\d{6}"&gt;&lt;/xs:pattern&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="LicenseKey"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:maxLength value="200"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;


    &lt;xs:simpleType name="Tid"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:pattern value="[a-zA-Z0-9\.,-\\/():]*"&gt;&lt;/xs:pattern&gt;
            &lt;xs:maxLength value="50"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="Ver"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:pattern value="[a-zA-Z0-9\.,-\\/():]*"&gt;&lt;/xs:pattern&gt;
            &lt;xs:maxLength value="10"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="Txn"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:pattern value="[a-zA-Z0-9\.,-\\/():]*"&gt;&lt;/xs:pattern&gt;
            &lt;xs:maxLength value="50"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="AuaCode"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:pattern value="[a-zA-Z0-9]*"&gt;&lt;/xs:pattern&gt;
            &lt;xs:maxLength value="10"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="Geocode"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:maxLength value="100"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="Latitude"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:maxLength value="100"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="Longitude"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:maxLength value="100"&gt;&lt;/xs:maxLength&gt;
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:simpleType name="LocationType"&gt;
        &lt;xs:restriction base="xs:string"&gt; 
            &lt;xs:enumeration value="G"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="P"&gt;&lt;/xs:enumeration&gt; 
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;

    &lt;xs:complexType name="Meta"&gt;
        &lt;xs:attribute name="udc"  use="required"&gt;
            &lt;xs:simpleType&gt;
                &lt;xs:restriction base="xs:string"&gt;
                    &lt;xs:maxLength value="20"&gt;&lt;/xs:maxLength&gt;
                &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="pip"  use="required"&gt;
            &lt;xs:simpleType&gt;
                &lt;xs:restriction base="xs:string"&gt;
                    &lt;xs:maxLength value="60"&gt;&lt;/xs:maxLength&gt;
                &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="fdc"  use="required"&gt;
            &lt;xs:simpleType&gt;
                &lt;xs:restriction base="xs:string"&gt;
                    &lt;xs:maxLength value="10"&gt;&lt;/xs:maxLength&gt;
                &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="idc"  use="required"&gt;
            &lt;xs:simpleType&gt;
                &lt;xs:restriction base="xs:string"&gt;
                    &lt;xs:maxLength value="10"&gt;&lt;/xs:maxLength&gt;
                &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="lot" type="tns:LocationType" use="required"&gt;
            &lt;xs:annotation&gt;
                &lt;xs:documentation&gt;Location Type&lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;                
        &lt;/xs:attribute&gt;
        &lt;xs:attribute name="lov" use="required"&gt;
            &lt;xs:simpleType&gt;
                &lt;xs:restriction base="xs:string"&gt;
                    &lt;xs:maxLength value="50"&gt;&lt;/xs:maxLength&gt;
                &lt;/xs:restriction&gt;
            &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;
    &lt;/xs:complexType&gt;

    &lt;xs:simpleType name="FingerPosition"&gt;
        &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:annotation&gt;
                &lt;xs:documentation&gt;
                    Finger positions
                &lt;/xs:documentation&gt;
            &lt;/xs:annotation&gt;
            &lt;xs:enumeration value="LEFT_INDEX"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="LEFT_LITTLE"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="LEFT_MIDDLE"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="LEFT_RING"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="LEFT_THUMB"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="RIGHT_INDEX"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="RIGHT_LITTLE"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="RIGHT_MIDDLE"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="RIGHT_RING"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="RIGHT_THUMB"&gt;&lt;/xs:enumeration&gt;
            &lt;xs:enumeration value="UNKNOWN"&gt;&lt;/xs:enumeration&gt;   
        &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;


&lt;/xs:schema&gt;
</code></pre>