<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified" attributeFormDefault="unqualified">


	<xs:element name="form">
	
		<xs:complexType>
			<xs:sequence>
			    <xs:element name="id" type="xs:int" />
			    <xs:element name="action" type="xs:string" />
				<xs:element ref="authentification" />
				<xs:element ref="info-general" />
				
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="authentification">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="login" type="chaine-non-vide" />
				<xs:element name="password" type="chaine-non-vide" />
				 <xs:element name="repassword" type="chaine-non-vide" />
				 <xs:element name="difference" type="xs:string" />
				<xs:element name="level" type="xs:string" />
				
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="info-general">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="cin" type="cin" />
				<xs:element name="cne" type="xs:string" />
				<xs:element name="nom" type="chaine-non-vide" />
				<xs:element name="prenom" type="chaine-non-vide" />
				<xs:element name="date-naissance" type="date-fr" />
				<xs:element name="email" type="chaine-non-vide" />
				<xs:element name="site-web" type="chaine-non-vide" />
				<xs:element name="telephone" type="telephone" />
				<xs:element name="adresse" type="chaine-non-vide" />
				<xs:element name="situation-familiale" type="xs:string" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>

   <xs:simpleType name="cin">
        <xs:restriction base="xs:string">
            <xs:minLength value ="6"/>
            <xs:maxLength value ="20"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="telephone">
        <xs:restriction base="xs:string">
            <xs:minLength value ="9"/>
            <xs:maxLength value ="9"/>
            <xs:pattern value="0[0-9]*"/>
        </xs:restriction>
    </xs:simpleType>
    
        <xs:simpleType name="cne">
        <xs:restriction base="xs:string">
            <xs:minLength value ="10"/>
            <xs:maxLength value ="10"/>
            <xs:pattern value="[0-9]*"/>
        </xs:restriction>
    </xs:simpleType>
    
    
    
    <xs:simpleType name="chaine-non-vide">
           
           <xs:restriction base="xs:string">
               <xs:minLength value="1" />
               <xs:whiteSpace value="collapse"/>
           </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="date-fr">
                <xs:restriction base="xs:string">
                    <xs:pattern value="(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])(19[0-9][0-9]|20[0-4][0-9]))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])(19[0-9][0-9]|20[0-4][0-9]))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])(19[0-9][0-9]|20[0-4][0-9]))|((29)(\.|-|\/)(02)([/])([2][0]00))|((29)([/])(02)([/])(19[0][48]|20[0][48]))|((29)([/])(02)([/])(19[2468][048]|20[24][048]))|((29)([/])(02)([/])(19[13579][26]|20[13][26])))"/>
                </xs:restriction>
    </xs:simpleType>
    



</xs:schema>