<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://ip6"
            targetNamespace="http://ip6" elementFormDefault="qualified">
  <xsd:annotation>
    <xsd:documentation xml:lang="es">Baja de certificados de programa para
                                     autoridad certificación</xsd:documentation>
    <xsd:appinfo xml:lang="es">Fecha de la última modificación: 13/09/2011</xsd:appinfo>
  </xsd:annotation>
  <xsd:simpleType name="CodigoProgramaRequerido">
    <xsd:annotation>
      <xsd:appinfo>[*](1,10)</xsd:appinfo>
      <xsd:documentation xml:lang="es">Valor de hasta 10 caracteres, obligatorio</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="10"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="CodigoCertificadoRequerido">
    <xsd:annotation>
      <xsd:appinfo>[*](1,10)</xsd:appinfo>
      <xsd:documentation xml:lang="es">Valor de hasta 10 caracteres, obligatorio</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="10"/>
    </xsd:restriction>
  </xsd:simpleType>
   <xsd:simpleType name="FechaRequerida">
    <xsd:annotation>
      <xsd:appinfo>dd/MM/yyyy</xsd:appinfo>
      <xsd:documentation xml:lang="es">Valor de tipo fecha, obligatorio</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="(([0][1-9]|[1-2][0-9]|[3][0-1])/([0][1-9]|[1][0-2])/([0-9]{4})){1}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="FechaLarga">
    <xsd:annotation>
      <xsd:appinfo>
        dd/MM/yyyy hh:mm:ss
      </xsd:appinfo>
      <xsd:documentation xml:lang="es">
        Valor de tipo fecha larga con hora
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="(([0][1-9]|[1-2][0-9]|[3][0-1])/([0][1-9]|[1][0-2])/([0-9]{4}) (([01][0-9])|(2[0-3]))(:[0-5][0-9]){2}(\.[0-9]+)?){0,1}"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="SiNoRequerido">
    <xsd:annotation>
      <xsd:appinfo>S | N</xsd:appinfo>
      <xsd:documentation xml:lang="es">Valor de tipo SiNo, obligatorio</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="(S|N){1}"/>
    </xsd:restriction>
  </xsd:simpleType>  
  <xsd:simpleType name="CodigoOperacionRequerido">
    <xsd:annotation>
      <xsd:appinfo>[*](1,25)</xsd:appinfo>
      <xsd:documentation xml:lang="es">Valor de hasta 25 caracteres, obligatorio</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="25"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:element name="SolicitudBorraCertProgAutoCert">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="detalleCertProgAutoCert" minOccurs="0"
                     maxOccurs="unbounded">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="codPOperativo" type="CodigoProgramaRequerido">
                <xsd:annotation>
                  <xsd:documentation xml:lang="es">Código del programa operativo.</xsd:documentation>
                </xsd:annotation>
                
              </xsd:element>
              <xsd:element name="codCertificado" type="CodigoCertificadoRequerido">
                <xsd:annotation>
                  <xsd:documentation xml:lang="es">Código del certificado para
                                                   autoridad certificación.</xsd:documentation>
                </xsd:annotation>
              </xsd:element> 
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="ResultadoBorraCertProgAutoCert">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="EstadoDeResultado">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="valor"/>
              <xsd:element name="fecha" type="FechaLarga"/>
              <xsd:element name="idValor"/>
              <xsd:element name="comentario"/>
              <xsd:element name="tipoProceso">
                <xsd:annotation>
                 <xsd:documentation>
                  Validación o carga
                 </xsd:documentation>
                </xsd:annotation>
               </xsd:element>
			   <xsd:element name="numeroElementosTratados"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="ResultadoConsulta">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="parCertProgAutoCertError" minOccurs="0"
                           maxOccurs="unbounded">
                <xsd:annotation>
                  <xsd:documentation xml:lang="es">Indica el certificado de programa
                                                   para autoridad
                                                   certificación que
                                                   se pretende borrar
                                                   o los certificados de la misma
                                                   que se pretenden borrar.</xsd:documentation>
                </xsd:annotation>                           
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="certProgAutoCertSolicitado" minOccurs="0"
                                 maxOccurs="unbounded">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="codPOperativo" type="CodigoProgramaRequerido">
                            <xsd:annotation>
                              <xsd:documentation xml:lang="es">Código del programa operativo.</xsd:documentation>
                            </xsd:annotation>
                          </xsd:element>
                          <xsd:element name="codCertificado" type="CodigoCertificadoRequerido">
                            <xsd:annotation>
                              <xsd:documentation xml:lang="es">Código del certificado para
                                                               autoridad certificación.</xsd:documentation>
                            </xsd:annotation>
                          </xsd:element>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="mensajesFallo">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="error" maxOccurs="unbounded"
                                       minOccurs="1"/>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="parCertProgAutoCert" maxOccurs="unbounded"
                           minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation xml:lang="es">Indica el o los certificados de un certificado
                                               de programa para autoridad
                                               certificación que
                                               se han borrado, sin borrar este certificado.</xsd:documentation>
                </xsd:annotation>                           
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name="certProgAutoCertValorNuevo">
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="codPOperativo" type="CodigoProgramaRequerido">
                            <xsd:annotation>
                              <xsd:documentation xml:lang="es">Código del programa operativo.</xsd:documentation>
                            </xsd:annotation>
                          </xsd:element>
                          <xsd:element name="codCertificado" type="CodigoCertificadoRequerido">
                            <xsd:annotation>
                              <xsd:documentation xml:lang="es">Código del certificado para
                                                               autoridad certificación.</xsd:documentation>
                            </xsd:annotation>
                          </xsd:element>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                    <xsd:element name="certProgAutoCertValorAnterior">
					<xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="codPOperativo" type="CodigoProgramaRequerido">
                            <xsd:annotation>
                              <xsd:documentation xml:lang="es">Código del programa operativo.</xsd:documentation>
                            </xsd:annotation>
                          </xsd:element>
                          <xsd:element name="codCertificado" type="CodigoCertificadoRequerido">
                            <xsd:annotation>
                              <xsd:documentation xml:lang="es">Código del certificado para
                                                               autoridad certificación.</xsd:documentation>
                            </xsd:annotation>
                          </xsd:element>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
			  <xsd:element name="certProgAutoCert" minOccurs="0"
                           maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:sequence>
                      <xsd:element name="codPOperativo" type="CodigoProgramaRequerido">
                        <xsd:annotation>
                          <xsd:documentation xml:lang="es">Código del programa operativo.</xsd:documentation>
                        </xsd:annotation>
                      </xsd:element>
                      <xsd:element name="codCertificado" type="CodigoCertificadoRequerido">
                        <xsd:annotation>
                          <xsd:documentation xml:lang="es">Código del certificado para
                                                           autoridad certificación.</xsd:documentation>
                        </xsd:annotation>
                      </xsd:element>                    
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
