<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.educa.jcyl.es/schema" targetNamespace="http://www.educa.jcyl.es/schema" elementFormDefault="qualified">
	<xs:element name="centro">
		<xs:annotation>
			<xs:documentation>Elemento de grupo correspondiente al centro educativo al que pertenecen los alumnos</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="codigoCentro" type="tCodigoCentro">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato numérico de 8 dígitos con el código del centro educativo</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element ref="grupo" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Obligatorio. Elemento de grupo correspondiente a cada grupo del centro educativo</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="grupo">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="cursoAcademico" type="tCursoAcademico">
					<xs:annotation>
						<xs:documentation>Obligatorio. 4 dígitos correspondientes al año de inicio del curso académico del grupo</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="periodo" type="tPeriodo">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 5 caracteres para introducir el código de la periodicidad del estudio del grupo.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="codigoGrupo" type="tCodigoGrupo">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 20 caracteres para introducir el código del grupo.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="desGrupo">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 1000 caracteres para introducir la descripción del grupo.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="1000"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="regimenImparte" type="tRegimenImparte">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 2 caracteres para introducir el código del régimen de impartición del estudio del grupo.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="expediente" type="tExpediente">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 12 caracteres para introducir el código del expediente correspondiente al grupo.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="nivelEducativo" type="tNivelEducativo">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 12 caracteres para introducir el código del nivel educativo correspondiente al grupo.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="tipoGrupo" type="tTtipoGrupo">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 1 caracter para introducir el tipo del grupo: Ordinario, Mixto, Distancia, Pruebas libres.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="turno" type="tTurno">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 1 caracter para introducir el turno del grupo: 0	Sin Turno, A	Distancia, D	Diurno, N	Nocturno, V	Vespertino.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="documentoTutorProfesor" type="tNifNie" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 9 caracteres. Corresponde con el número de documento del profesor tutor/es que tienen asignado el grupo.  Solo se contemplan como tipos de documento NIF o NIE. </xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="alumnos">
					<xs:complexType>
						<xs:sequence>
							<xs:element ref="alumno" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>Obligatorio. Elemento de grupo correspondiente a cada alumno del centro educativo</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="alumno">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="cie" type="tCIE" minOccurs="0">
					<xs:annotation>
						<xs:documentation>NO Obligatorio. Formato alfanumérico de 16 caracteres con el CIE asignado al alumno. Vacío para candidatos que todavía no disponen de CIE</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="nombre" type="tNombres">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfanumérico de 30 caractéres con el nombre del alumno.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="apellido1" type="tNombres">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfabético de 30 caracteres con el primer apellido del alumno.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="apellido2" type="tNombres" minOccurs="0">
					<xs:annotation>
						<xs:documentation>NO Obligatorio. Formato alfabético de 30 caracteres con el segundo apellido del alumno.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="nifNie" type="tNifNie" minOccurs="0">
					<xs:annotation>
						<xs:documentation>NO Obligatorio. Formato alfanumérico de 9 caracteres.  Solo se contemplan como tipos de documento NIF o NIE</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="sexo" type="tSexo">
					<xs:annotation>
						<xs:documentation>Obligatorio. Formato alfabético de 1 caracter con el sexo del alumno. Los valores posibles son:  V - Varón M - Mujer</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="fechaNacimiento" type="xs:date">
					<xs:annotation>
						<xs:documentation>Obligatorio. Con la fecha de nacimiento del alumno [YYYY-MM-DD]</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="tCursoAcademico">
		<xs:restriction base="xs:integer">
			<xs:pattern value="[2][0-9][0-9][0-9]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tNifNie">
		<xs:restriction base="xs:string">
			<xs:length value="9"/>
			<xs:pattern value="[XYZxyz]?[0-9]{7,8}[a-zA-Z]"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tSexo">
		<xs:restriction base="xs:string">
			<xs:length value="1"/>
			<xs:pattern value="[VvMm]"/>
			<xs:enumeration value="V"/>
			<xs:enumeration value="M"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tNombres">
		<xs:restriction base="xs:token">
			<xs:maxLength value="30"/>
			<xs:pattern value="([^0-9])*"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tCodigoCentro">
		<xs:restriction base="xs:string">
			<xs:pattern value="[0-9]{8}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tEstudio">
		<xs:restriction base="xs:string">
			<xs:maxLength value="12"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tCurriculo">
		<xs:restriction base="xs:string">
			<xs:maxLength value="3"/>
			<xs:enumeration value="A">
				<xs:annotation>
					<xs:documentation>"Adultos"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="BB">
				<xs:annotation>
					<xs:documentation>"Bachibac"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="D">
				<xs:annotation>
					<xs:documentation>"Programa de Diversificación Curricula"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="DI">
				<xs:annotation>
					<xs:documentation>"Distancia"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="DU">
				<xs:annotation>
					<xs:documentation>"Dual"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="FU">
				<xs:annotation>
					<xs:documentation>"Funcional"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="G">
				<xs:annotation>
					<xs:documentation>"General"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="G1">
				<xs:annotation>
					<xs:documentation>"General reformado"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="IB">
				<xs:annotation>
					<xs:documentation>"Bachillerato Internacional"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="IE">
				<xs:annotation>
					<xs:documentation>"Iniciación Profesional Especial"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="IEE">
				<xs:annotation>
					<xs:documentation>"Investigación/Excelencia(Específico)"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="IEX">
				<xs:annotation>
					<xs:documentation>"Investigación/Excelencia"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="IP">
				<xs:annotation>
					<xs:documentation>"Iniciación Profesional"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="L">
				<xs:annotation>
					<xs:documentation>"Pruebas Libres"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="M">
				<xs:annotation>
					<xs:documentation>"Programa de Mejora del Aprendizaje y Rendimiento (MARE)"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="SI">
				<xs:annotation>
					<xs:documentation>"General con Segundo Idioma"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="TP">
				<xs:annotation>
					<xs:documentation>"Talleres Profesionales"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tRegimenImparte">
		<xs:restriction base="xs:string">
			<xs:maxLength value="2"/>
			<xs:enumeration value="PR">
				<xs:annotation>
					<xs:documentation>"Presencial"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="NC">
				<xs:annotation>
					<xs:documentation>"Nocturno"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="MO">
				<xs:annotation>
					<xs:documentation>"Modular o Parcial"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="DI">
				<xs:annotation>
					<xs:documentation>"Distancia"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="EL">
				<xs:annotation>
					<xs:documentation>"DE-learning"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="LI">
				<xs:annotation>
					<xs:documentation>"Libre"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="DU">
				<xs:annotation>
					<xs:documentation>"Dual"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tCursoEstudio">
		<xs:restriction base="xs:string">
			<xs:maxLength value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tPeriodo">
		<xs:restriction base="xs:string">
			<xs:maxLength value="5"/>
			<xs:enumeration value="A">
				<xs:annotation>
					<xs:documentation>"Anual"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="C1">
				<xs:annotation>
					<xs:documentation>"Primer cuatrimestre"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="C2">
				<xs:annotation>
					<xs:documentation>"Segundo cuatrimestre"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tCIE">
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-ZÑ]{6}[0-9]{4}[A-ZÑ0-9]{4}[0-9]{2}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tSN">
		<xs:restriction base="xs:string">
			<xs:length value="1"/>
			<xs:enumeration value="S"/>
			<xs:enumeration value="N"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tCodigoGrupo">
		<xs:restriction base="xs:string">
			<xs:maxLength value="20"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tExpediente">
		<xs:restriction base="xs:string">
			<xs:maxLength value="12"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tNivelEducativo">
		<xs:restriction base="xs:string">
			<xs:maxLength value="12"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tTtipoGrupo">
		<xs:restriction base="xs:string">
			<xs:enumeration value="1">
				<xs:annotation>
					<xs:documentation>"Ordinario"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="2">
				<xs:annotation>
					<xs:documentation>"Mixto"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="3">
				<xs:annotation>
					<xs:documentation>"Distancia"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="4">
				<xs:annotation>
					<xs:documentation>"Pruebas Libres"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="tTurno">
		<xs:restriction base="xs:string">
			<xs:enumeration value="0">
				<xs:annotation>
					<xs:documentation>"Sin Turno"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="A">
				<xs:annotation>
					<xs:documentation>"Distancia"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="D">
				<xs:annotation>
					<xs:documentation>"Diurno"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="N">
				<xs:annotation>
					<xs:documentation>"Nocturno"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="V">
				<xs:annotation>
					<xs:documentation>"Vespertino"</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
