Version primaire

This commit is contained in:
jfontaine35 2024-01-11 14:18:16 +01:00 committed by GitHub
parent bce52c365f
commit 419897dc27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 3148 additions and 0 deletions

160
Accrochage.py Normal file
View File

@ -0,0 +1,160 @@
import xml.etree.ElementTree as ET
import csv
import random
import logging
import datetime
import subprocess
import pytz
import os
# Emplacement du fichier CSV et XML
csv_file = "Dico2.csv"
xml_file = "file.xml"
tz_paris = pytz.timezone('Europe/Paris')
#Efface la console
def clear_console():
os.system('cls' if os.name == 'nt' else 'clear')
clear_console()
# Configuration du logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
def indent(elem, level=0):
""" Ajoute des indentations aux éléments pour une meilleure lisibilité du fichier XML. """
i = "\n" + level * " "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + " "
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in elem:
indent(elem, level + 1)
if not elem.tail or not elem.tail.strip():
elem.tail = i
else:
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
# Fonction pour lire les données CSV et générer le fichier XML
def create_xml_from_csv(csv_filepath, xml_filepath):
logging.info("Ouverture du CSV...")
# Ouvrir le fichier CSV pour la lecture
with open(csv_filepath, newline='', encoding='utf-8') as csvfile:
reader = csv.reader(csvfile)
Allrows = list(reader)
# Vérification de la présence des données nécessaires
if len(Allrows) < 5:
logging.error("Les données CSV requises sont manquantes.")
exit()
headers = Allrows[4][2:] # Sauter les deux premiers en-têtes
logging.info("Création de l'arborescence du fichier XML...")
# Créer l'élément racine avec l'espace de noms 'cpf'
root = ET.Element("cpf:flux")
root.set("xmlns:cpf", "urn:cdc:cpf:pc5:schema:1.0.0")
root.set("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance")
#Reglage du fuseau horaire
now = datetime.datetime.now(tz_paris)
value = now.strftime("%Y-%m-%dT%H:%M:%S+01:00")
ET.SubElement(root, "cpf:idFlux").text = headers[0]
#str(random.randint(1000000000, 99999999999))
ET.SubElement(root, "cpf:horodatage").text = value
# Création et ajout de l'élément emetteur
emetteur = ET.SubElement(root, "cpf:emetteur")
logging.info("Emmetteur du fchier ...")
# Création de la structure des certificateurs
idClient = str(random.randint(10000000, 99999999)) if Allrows[5][2] == '' else Allrows[5][2]
ET.SubElement(emetteur, "cpf:idClient").text = idClient
certificateurs = ET.SubElement(emetteur, "cpf:certificateurs")
certificateur = ET.SubElement(certificateurs, "cpf:certificateur")
logging.info(f"Certificateur {idClient}...")
# Traitement pour NumClient pour le certificateur
idClient2 = str(random.randint(10000000, 99999999)) if Allrows[5][3] == '' else Allrows[5][3]
ET.SubElement(certificateur, "cpf:idClient").text = idClient2
# Traitement pour NumContrat pour le certificateur
idContrat = str(random.randint(10000000, 99999999)) if Allrows[5][4] == '' else Allrows[5][4]
ET.SubElement(certificateur, "cpf:idContrat").text = idContrat
# Création de la structure des certifications
certifications = ET.SubElement(certificateur, "cpf:certifications")
certification = ET.SubElement(certifications, "cpf:certification")
ET.SubElement(certification, "cpf:type").text = headers[5]
ET.SubElement(certification, "cpf:code").text = headers[6]
# Ajout d'un seul passage de certification
passage_certifications = ET.SubElement(certification, "cpf:passageCertifications")
# Itérer sur chaque ligne du fichier CSV
for row in Allrows[5:]:
# Sauter les lignes vides
if not row[0].strip():
continue
#Ajout des certifications
logging.info(f"Ajout des certifications : {row[7]}")
passage_certification = ET.SubElement(passage_certifications, "cpf:passageCertification")
ET.SubElement(passage_certification, "cpf:idTechnique").text = row[7]
ET.SubElement(passage_certification, "cpf:obtentionCertification").text = row[8]
ET.SubElement(passage_certification, "cpf:donneeCertifiee").text = row[9]
ET.SubElement(passage_certification, "cpf:dateDebutValidite").text = row[10]
# Vérification si la date de fin de validité est 'nil;'
if row[11].strip().lower() == 'nil':
ET.SubElement(passage_certification, "cpf:dateFinValidite", {"xsi:nil": "true"})
else:
ET.SubElement(passage_certification, "cpf:dateFinValidite").text = row[11]
ET.SubElement(passage_certification, "cpf:presenceNiveauLangueEuro").text = row[12]
ET.SubElement(passage_certification, "cpf:presenceNiveauNumeriqueEuro").text = row[13]
if row[14].strip().lower() == 'nil':
ET.SubElement(passage_certification, "cpf:scoring", {"xsi:nil": "true"})
else:
ET.SubElement(passage_certification, "cpf:scoring").text = row[14]
if row[15].strip().lower() == 'nil':
ET.SubElement(passage_certification, "cpf:mentionValidee", {"xsi:nil": "true"})
else:
ET.SubElement(passage_certification, "cpf:mentionValidee").text = row[15]
# Modalite inscription
modalites_inscription = ET.SubElement(passage_certification, "cpf:modalitesInscription")
ET.SubElement(modalites_inscription, "cpf:modaliteAcces").text = row[16]
#Identification Titulaire
identification_titulaire = ET.SubElement(passage_certification, "cpf:identificationTitulaire")
titulaire = ET.SubElement(identification_titulaire, "cpf:titulaire")
logging.info(f"Titulaire : {row[18]} {row[19]}")
ET.SubElement(titulaire, "cpf:nomNaissance").text = row[17]
ET.SubElement(titulaire, "cpf:nomUsage").text = row[18]
ET.SubElement(titulaire, "cpf:prenom1").text = row[19]
ET.SubElement(titulaire, "cpf:anneeNaissance").text = row[20]
ET.SubElement(titulaire, "cpf:moisNaissance").text = row[21]
ET.SubElement(titulaire, "cpf:jourNaissance").text = row[22]
ET.SubElement(titulaire, "cpf:sexe").text = row[23]
code_commune_naissance = ET.SubElement(titulaire, "cpf:codeCommuneNaissance")
code_postal_naissance = ET.SubElement(code_commune_naissance, "cpf:codePostalNaissance")
ET.SubElement(code_postal_naissance, "cpf:codePostal").text = row[24]
# Appliquer l'indentation
indent(root)
# Enregistrement du fichier XML
logging.info(f"Ecriture du XML...")
tree = ET.ElementTree(root)
with open(xml_filepath, "wb") as file:
tree.write(file, encoding="utf-8", xml_declaration=True)
# Appel de la fonction pour créer le fichier XML
create_xml_from_csv(csv_file, xml_file)
logging.info("Fichier XML créé avec succès.")

9
Dico.csv Normal file
View File

@ -0,0 +1,9 @@
BLOC 1,,BLOC 2,BLOC 3,,BLOC 4,,BLOC 5,,,,,,,,,BLOC 7,BLOC 8,,,,,,,
<cpf:flux>,<cpf:flux>,<cpf:emetteur>,<cpf:certificateur>,<cpf:certificateur>,<cpf:certification>,,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:passageCertification>,<cpf:modalitesInscription>,<cpf:titulaire>,<cpf:titulaire>,<cpf:titulaire>,<cpf:titulaire>,<cpf:titulaire>,<cpf:titulaire>,<cpf:titulaire>,<cpf:titulaire>
1.1,1.2,2.1,3.1,3.2,4.1,4.2,5.1,5.4,5.5,5.10,5.11,5.12,5.14,5.15,5.16,7.1,8.1,8.2,8.3,8.6,8.7,8.8,8.9,8.11
Identifiant du flux,Horodatage,N° de la fiche client de l'emetteur,N° de la fiche client Certificateur,Numéro de contrat spécifique Certificateur,Type de certification,Code,ID Technique du passage de la certification,Obtention de la certification par admission ou scoring,Donnée certifiée,Date de début de validité et de délivrance de la certification,Date de fin de validité de la certification,Présence du niveau de langue européen,Présence du niveau numérique européen,Scoring ou base de notation,Mention(s) validée(s),Modalité d'accès à la certification,Nom de naissance du titulaire,Nom d'usage ou marital,Prénom 1,Année de naissance,Mois de naissance,Jour de naissance,Sexe,Code postal de la commune de naissance du titulaire
idFlux,horodatage,idClient,idClient,idContrat,type,code,idTechnique,obtentionCertification,donneeCertifiee,dateDebutValidite,dateFinValidite,presenceNiveauLangueEuro,presenceNiveauNumeriqueEuro,scoring,mentionValidee,modaliteAcces,nomNaissance,nomUsage,prenom1,anneeNaissance,moisNaissance,jourNaissance,sexe,codePostal
..0,03/01/2024,,,,RNCP;,RNCP35726,#VALUE!,PAR_ADMISSION;,true;,,nil;,false;,false;,nil;,nil;,,,,,,,,,
..1,03/01/2024,,,,RNCP;,RNCP35726,#VALUE!,PAR_ADMISSION;,true;,,nil;,false;,false;,nil;,nil;,,,,,,,,,
..2,03/01/2024,,,,RNCP;,RNCP35726,#VALUE!,PAR_ADMISSION;,true;,,nil;,false;,false;,nil;,nil;,,,,,,,,,
..3,03/01/2024,,,,RNCP;,RNCP35726,#VALUE!,PAR_ADMISSION;,true;,,nil;,false;,false;,nil;,nil;,,,,,,,,,
1 BLOC 1 BLOC 2 BLOC 3 BLOC 4 BLOC 5 BLOC 7 BLOC 8
2 <cpf:flux> <cpf:flux> <cpf:emetteur> <cpf:certificateur> <cpf:certificateur> <cpf:certification> <cpf:passageCertification> <cpf:passageCertification> <cpf:passageCertification> <cpf:passageCertification> <cpf:passageCertification> <cpf:passageCertification> <cpf:passageCertification> <cpf:passageCertification> <cpf:passageCertification> <cpf:modalitesInscription> <cpf:titulaire> <cpf:titulaire> <cpf:titulaire> <cpf:titulaire> <cpf:titulaire> <cpf:titulaire> <cpf:titulaire> <cpf:titulaire>
3 1.1 1.2 2.1 3.1 3.2 4.1 4.2 5.1 5.4 5.5 5.10 5.11 5.12 5.14 5.15 5.16 7.1 8.1 8.2 8.3 8.6 8.7 8.8 8.9 8.11
4 Identifiant du flux Horodatage N° de la fiche client de l'emetteur N° de la fiche client Certificateur Numéro de contrat spécifique Certificateur Type de certification Code ID Technique du passage de la certification Obtention de la certification par admission ou scoring Donnée certifiée Date de début de validité et de délivrance de la certification Date de fin de validité de la certification Présence du niveau de langue européen Présence du niveau numérique européen Scoring ou base de notation Mention(s) validée(s) Modalité d'accès à la certification Nom de naissance du titulaire Nom d'usage ou marital Prénom 1 Année de naissance Mois de naissance Jour de naissance Sexe Code postal de la commune de naissance du titulaire
5 idFlux horodatage idClient idClient idContrat type code idTechnique obtentionCertification donneeCertifiee dateDebutValidite dateFinValidite presenceNiveauLangueEuro presenceNiveauNumeriqueEuro scoring mentionValidee modaliteAcces nomNaissance nomUsage prenom1 anneeNaissance moisNaissance jourNaissance sexe codePostal
6 ..0 03/01/2024 RNCP; RNCP35726 #VALUE! PAR_ADMISSION; true; nil; false; false; nil; nil;
7 ..1 03/01/2024 RNCP; RNCP35726 #VALUE! PAR_ADMISSION; true; nil; false; false; nil; nil;
8 ..2 03/01/2024 RNCP; RNCP35726 #VALUE! PAR_ADMISSION; true; nil; false; false; nil; nil;
9 ..3 03/01/2024 RNCP; RNCP35726 #VALUE! PAR_ADMISSION; true; nil; false; false; nil; nil;

BIN
Dico.ods Normal file

Binary file not shown.

9
Dico2.csv Normal file
View File

@ -0,0 +1,9 @@
BLOC 1,,BLOC 2,BLOC 3,,BLOC 4,,BLOC 5,,,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
<cpf:flux>,,<cpf:emetteur>,<cpf:certificateur>,,<cpf:certification>,,<cpf:passageCertification>,,,,,,,,,<cpf:modalitesInscription>,<cpf:titulaire>,,,,,,,
1.1,1.2,2.1,3.1,3.2,4.1,4.2,5.1,,5.5,5.10,5.11,5.12,5.14,5.15,5.16,7.1,8.1,8.2,8.3,8.6,8.7,8.8,8.9,8.11
Identifiant du flux,Horodatage,N° de la fiche client de l'emetteur,N° de la fiche client Certificateur,Numéro de contrat spécifique Certificateur,Type de certification,Code,ID Technique du passage de la certification,Obtention de la certification par admission ou scoring,Donnée certifiée,Date de début de validité et de délivrance de la certification,Date de fin de validité de la certification,Présence du niveau de langue européen,Présence du niveau numérique européen,Scoring ou base de notation,Mention(s) validée(s),Modalité d'accès à la certification,Nom de naissance du titulaire,Nom d'usage ou marital,Prénom 1,Année de naissance,Mois de naissance,Jour de naissance,Sexe,Code postal de la commune de naissance du titulaire
idFlux,horodatage,idClient,idClient,idContrat,type,code,idTechnique,obtentionCertification,donneeCertifiee,dateDebutValidite,dateFinValidite,presenceNiveauLangueEuro,presenceNiveauNumeriqueEuro,scoring,mentionValidee,modaliteAcces,nomNaissance,nomUsage,prenom1,anneeNaissance,moisNaissance,jourNaissance,sexe,codeCommuneNaissance
156258,2024-01-10T14:24:12+01:00,,,,RNCP,RNCP35726,#VALEUR !,PAR_ADMISSION,true,2022-01-18,nil,false,false,nil,nil,FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION,toto,toto,test1,1980,7,1,M,75001
856269,2024-01-10T14:24:12+01:01,,,,RNCP,RNCP35726,#VALEUR !,PAR_ADMISSION,true,2022-01-19,nil,false,false,nil,nil,FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION,tata,tata,test2,1981,8,2,F,75002
147893,2024-01-10T14:24:12+01:02,,,,RNCP,RNCP35726,#VALEUR !,PAR_ADMISSION,true,2022-01-20,nil,false,false,nil,nil,FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION,titi,titi,test3,1982,9,3,F,75003
258964,2024-01-10T14:24:12+01:03,,,,RNCP,RNCP35726,#VALEUR !,PAR_ADMISSION,true,2022-01-21,nil,false,false,nil,nil,FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION,tonton,tonton,test4,1983,10,4,M,75004
1 BLOC 1 BLOC 2 BLOC 3 BLOC 4 BLOC 5 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
2 <cpf:flux> <cpf:emetteur> <cpf:certificateur> <cpf:certification> <cpf:passageCertification> <cpf:modalitesInscription> <cpf:titulaire>
3 1.1 1.2 2.1 3.1 3.2 4.1 4.2 5.1 5.5 5.10 5.11 5.12 5.14 5.15 5.16 7.1 8.1 8.2 8.3 8.6 8.7 8.8 8.9 8.11
4 Identifiant du flux Horodatage N° de la fiche client de l'emetteur N° de la fiche client Certificateur Numéro de contrat spécifique Certificateur Type de certification Code ID Technique du passage de la certification Obtention de la certification par admission ou scoring Donnée certifiée Date de début de validité et de délivrance de la certification Date de fin de validité de la certification Présence du niveau de langue européen Présence du niveau numérique européen Scoring ou base de notation Mention(s) validée(s) Modalité d'accès à la certification Nom de naissance du titulaire Nom d'usage ou marital Prénom 1 Année de naissance Mois de naissance Jour de naissance Sexe Code postal de la commune de naissance du titulaire
5 idFlux horodatage idClient idClient idContrat type code idTechnique obtentionCertification donneeCertifiee dateDebutValidite dateFinValidite presenceNiveauLangueEuro presenceNiveauNumeriqueEuro scoring mentionValidee modaliteAcces nomNaissance nomUsage prenom1 anneeNaissance moisNaissance jourNaissance sexe codeCommuneNaissance
6 156258 2024-01-10T14:24:12+01:00 RNCP RNCP35726 #VALEUR ! PAR_ADMISSION true 2022-01-18 nil false false nil nil FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION toto toto test1 1980 7 1 M 75001
7 856269 2024-01-10T14:24:12+01:01 RNCP RNCP35726 #VALEUR ! PAR_ADMISSION true 2022-01-19 nil false false nil nil FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION tata tata test2 1981 8 2 F 75002
8 147893 2024-01-10T14:24:12+01:02 RNCP RNCP35726 #VALEUR ! PAR_ADMISSION true 2022-01-20 nil false false nil nil FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION titi titi test3 1982 9 3 F 75003
9 258964 2024-01-10T14:24:12+01:03 RNCP RNCP35726 #VALEUR ! PAR_ADMISSION true 2022-01-21 nil false false nil nil FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION tonton tonton test4 1983 10 4 M 75004

190
Fichier XML v2.0.0.xml Normal file
View File

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<cpf:flux xmlns:cpf="urn:cdc:cpf:pc5:schema:1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<cpf:idFlux>6e3c7378-bda4-497a-9bd6-dc203f903ed9</cpf:idFlux>
<cpf:horodatage>2020-12-18T14:24:12+01:00</cpf:horodatage>
<cpf:emetteur>
<cpf:idClient>AB123CDE</cpf:idClient>
<cpf:certificateurs>
<cpf:certificateur>
<cpf:idClient>E564ACB0</cpf:idClient>
<cpf:idContrat>2560080000127J</cpf:idContrat>
<cpf:certifications>
<cpf:certification>
<cpf:type>RNCP</cpf:type>
<cpf:code>RNCP19117</cpf:code>
<cpf:natureDeposant>CERTIFICATEUR</cpf:natureDeposant>
<cpf:passageCertifications>
<cpf:passageCertification>
<cpf:idTechnique>db855769-bcd6-4253-93cf-e666db666c0a</cpf:idTechnique>
<cpf:urlPreuve>https://www.google.fr</cpf:urlPreuve>
<cpf:libelleOption>Mention spéciale</cpf:libelleOption>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutExamen>2020-12-20</cpf:dateDebutExamen>
<cpf:dateFinExamen>2020-12-22</cpf:dateFinExamen>
<cpf:modalitePassageExamen>EN_PRESENTIEL</cpf:modalitePassageExamen>
<cpf:codePostalCentreExamen>75009</cpf:codePostalCentreExamen>
<cpf:dateDebutValidite>2020-12-12</cpf:dateDebutValidite>
<cpf:dateFinValidite xsi:nil="true"></cpf:dateFinValidite>
<cpf:presenceNiveauLangueEuro>true</cpf:presenceNiveauLangueEuro>
<cpf:niveauLangueEuropeen>A1</cpf:niveauLangueEuropeen>
<cpf:presenceNiveauNumeriqueEuro>true</cpf:presenceNiveauNumeriqueEuro>
<cpf:niveauNumeriqueEuropeen>
<cpf:scoreGeneral>890</cpf:scoreGeneral>
<cpf:resultats>
<cpf:resultat>
<cpf:niveau>5</cpf:niveau>
<cpf:domaineCompetenceId>3</cpf:domaineCompetenceId>
<cpf:competenceId>4</cpf:competenceId>
</cpf:resultat>
<cpf:resultat>
<cpf:niveau>7</cpf:niveau>
<cpf:domaineCompetenceId>1</cpf:domaineCompetenceId>
<cpf:competenceId>1</cpf:competenceId>
</cpf:resultat>
</cpf:resultats>
</cpf:niveauNumeriqueEuropeen>
<cpf:scoring>12.4</cpf:scoring>
<cpf:mentionValidee>MENTION_ASSEZ_BIEN</cpf:mentionValidee>
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_INITIALE_APPRENTISSAGE</cpf:modaliteAcces>
<cpf:voieAccessVAE>VAE_CLASSIQUE</cpf:voieAccessVAE>
<cpf:initiativeInscription>CERTIFIE</cpf:initiativeInscription>
<cpf:dateInscription>2019-02-10</cpf:dateInscription>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>Dupont</cpf:nomNaissance>
<cpf:nomUsage>Dupont</cpf:nomUsage>
<cpf:prenom1>Antoine</cpf:prenom1>
<cpf:prenom2>Julien</cpf:prenom2>
<cpf:prenom3>Philippe</cpf:prenom3>
<cpf:anneeNaissance>1996</cpf:anneeNaissance>
<cpf:moisNaissance>11</cpf:moisNaissance>
<cpf:jourNaissance>15</cpf:jourNaissance>
<cpf:sexe>M</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codeInseeNaissance>
<cpf:codeInsee>31555</cpf:codeInsee>
</cpf:codeInseeNaissance>
</cpf:codeCommuneNaissance>
<cpf:libelleCommuneNaissance>Toulouse</cpf:libelleCommuneNaissance>
<cpf:libellePaysNaissance>France</cpf:libellePaysNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
<cpf:verbatim>TOSA</cpf:verbatim>
</cpf:passageCertification>
<cpf:passageCertification>
<cpf:idTechnique>10c54fd2-f3a3-4dea-b975-4d7258bd10b3</cpf:idTechnique>
<cpf:urlPreuve>https://www.google.fr</cpf:urlPreuve>
<cpf:libelleOption>Mention spéciale</cpf:libelleOption>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutExamen>2020-12-20</cpf:dateDebutExamen>
<cpf:dateFinExamen>2020-12-22</cpf:dateFinExamen>
<cpf:modalitePassageExamen>EN_PRESENTIEL</cpf:modalitePassageExamen>
<cpf:codePostalCentreExamen>75009</cpf:codePostalCentreExamen>
<cpf:dateDebutValidite>2020-12-12</cpf:dateDebutValidite>
<cpf:dateFinValidite>2030-12-13</cpf:dateFinValidite>
<cpf:presenceNiveauLangueEuro>true</cpf:presenceNiveauLangueEuro>
<cpf:niveauLangueEuropeen>A1</cpf:niveauLangueEuropeen>
<cpf:presenceNiveauNumeriqueEuro>true</cpf:presenceNiveauNumeriqueEuro>
<cpf:niveauNumeriqueEuropeen>
<cpf:scoreGeneral>890</cpf:scoreGeneral>
<cpf:resultats>
<cpf:resultat>
<cpf:niveau>5</cpf:niveau>
<cpf:domaineCompetenceId>3</cpf:domaineCompetenceId>
<cpf:competenceId>4</cpf:competenceId>
</cpf:resultat>
<cpf:resultat>
<cpf:niveau>7</cpf:niveau>
<cpf:domaineCompetenceId>1</cpf:domaineCompetenceId>
<cpf:competenceId>1</cpf:competenceId>
</cpf:resultat>
</cpf:resultats>
</cpf:niveauNumeriqueEuropeen>
<cpf:scoring>12.4</cpf:scoring>
<cpf:mentionValidee>MENTION_ASSEZ_BIEN</cpf:mentionValidee>
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_INITIALE_APPRENTISSAGE</cpf:modaliteAcces>
<cpf:voieAccessVAE>VAE_CLASSIQUE</cpf:voieAccessVAE>
<cpf:initiativeInscription>CERTIFIE</cpf:initiativeInscription>
<cpf:dateInscription>2019-02-10</cpf:dateInscription>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:dossierFormation>
<cpf:idDossier>1234567891011</cpf:idDossier>
<cpf:nomTitulaire>Dupont</cpf:nomTitulaire>
<cpf:prenom1Titulaire>Antoine</cpf:prenom1Titulaire>
</cpf:dossierFormation>
</cpf:identificationTitulaire>
<cpf:verbatim>TOSA</cpf:verbatim>
</cpf:passageCertification>
<cpf:passageCertification>
<cpf:idTechnique>0785a873-acf7-4632-ad7b-b11cfff05b13</cpf:idTechnique>
<cpf:urlPreuve>https://www.google.fr</cpf:urlPreuve>
<cpf:libelleOption>Mention spéciale</cpf:libelleOption>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutExamen>2020-12-20</cpf:dateDebutExamen>
<cpf:dateFinExamen>2020-12-22</cpf:dateFinExamen>
<cpf:modalitePassageExamen>EN_PRESENTIEL</cpf:modalitePassageExamen>
<cpf:codePostalCentreExamen>75009</cpf:codePostalCentreExamen>
<cpf:dateDebutValidite>2020-12-12</cpf:dateDebutValidite>
<cpf:dateFinValidite>2030-12-13</cpf:dateFinValidite>
<cpf:presenceNiveauLangueEuro>true</cpf:presenceNiveauLangueEuro>
<cpf:niveauLangueEuropeen>A1</cpf:niveauLangueEuropeen>
<cpf:presenceNiveauNumeriqueEuro>true</cpf:presenceNiveauNumeriqueEuro>
<cpf:niveauNumeriqueEuropeen>
<cpf:scoreGeneral>890</cpf:scoreGeneral>
<cpf:resultats>
<cpf:resultat>
<cpf:niveau>7</cpf:niveau>
<cpf:domaineCompetenceId>1</cpf:domaineCompetenceId>
<cpf:competenceId>1</cpf:competenceId>
</cpf:resultat>
<cpf:resultat>
<cpf:niveau>5</cpf:niveau>
<cpf:domaineCompetenceId>3</cpf:domaineCompetenceId>
<cpf:competenceId>4</cpf:competenceId>
</cpf:resultat>
</cpf:resultats>
</cpf:niveauNumeriqueEuropeen>
<cpf:scoring>12.4</cpf:scoring>
<cpf:mentionValidee>MENTION_ASSEZ_BIEN</cpf:mentionValidee>
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_INITIALE_APPRENTISSAGE</cpf:modaliteAcces>
<cpf:voieAccessVAE>VAE_CLASSIQUE</cpf:voieAccessVAE>
<cpf:initiativeInscription>CERTIFIE</cpf:initiativeInscription>
<cpf:dateInscription>2019-02-10</cpf:dateInscription>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>Dupont</cpf:nomNaissance>
<cpf:nomUsage>Dupont</cpf:nomUsage>
<cpf:prenom1>Antoine</cpf:prenom1>
<cpf:prenom2>Julien</cpf:prenom2>
<cpf:prenom3>Philippe</cpf:prenom3>
<cpf:anneeNaissance>1996</cpf:anneeNaissance>
<cpf:moisNaissance>11</cpf:moisNaissance>
<cpf:jourNaissance>15</cpf:jourNaissance>
<cpf:sexe>M</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codeInseeNaissance>
<cpf:codeInsee>31555</cpf:codeInsee>
</cpf:codeInseeNaissance>
</cpf:codeCommuneNaissance>
<cpf:libelleCommuneNaissance>Toulouse</cpf:libelleCommuneNaissance>
<cpf:libellePaysNaissance>France</cpf:libellePaysNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
<cpf:verbatim>TOSA</cpf:verbatim>
</cpf:passageCertification>
</cpf:passageCertifications>
</cpf:certification>
</cpf:certifications>
</cpf:certificateur>
</cpf:certificateurs>
</cpf:emetteur>
</cpf:flux>

489
Fichier XSD v2.0.0.xsd Normal file
View File

@ -0,0 +1,489 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:cpf="urn:cdc:cpf:pc5:schema:1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:cdc:cpf:pc5:schema:1.0.0" elementFormDefault="qualified" version="1.1.2">
<xsd:complexType name="flux">
<xsd:all>
<xsd:element name="idFlux">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="horodatage">
<xsd:simpleType>
<xsd:restriction base="xsd:dateTime">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9](\+|-)(:2[0-3]|[01][0-9]):[0-5][0-9]"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="emetteur" type="cpf:emetteur"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="emetteur">
<xsd:all>
<xsd:element name="idClient">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="certificateurs" type="cpf:certificateurs"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="certificateurs">
<xsd:all>
<xsd:element name="certificateur" type="cpf:certificateur"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="certificateur">
<xsd:all>
<xsd:element name="idClient">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="idContrat">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="certifications">
<xsd:complexType>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="certification" type="cpf:certification"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="certification">
<xsd:all>
<xsd:element name="type">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="code">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="natureDeposant" type="cpf:natureDeposant" minOccurs="0"/>
<xsd:element name="passageCertifications">
<xsd:complexType>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="passageCertification" type="cpf:passageCertification"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="passageCertification">
<xsd:all>
<xsd:element name="idTechnique">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="urlPreuve" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="libelleOption" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="obtentionCertification" type="cpf:obtentionCertification"/>
<xsd:element name="donneeCertifiee" type="xsd:boolean"/>
<xsd:element name="dateDebutExamen" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="dateFinExamen" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="modalitePassageExamen" type="cpf:modalitePassageExamen" minOccurs="0"/>
<xsd:element name="codePostalCentreExamen" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="dateDebutValidite">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="dateFinValidite" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="presenceNiveauLangueEuro" type="xsd:boolean"/>
<xsd:element name="niveauLangueEuropeen" type="cpf:niveauCECRL" minOccurs="0"/>
<xsd:element name="presenceNiveauNumeriqueEuro" type="xsd:boolean"/>
<xsd:element name="niveauNumeriqueEuropeen" type="cpf:niveauNumeriqueEuropeen" minOccurs="0"/>
<xsd:element name="scoring" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="mentionValidee" type="cpf:mention" nillable="true"/>
<xsd:element name="modalitesInscription" type="cpf:modalitesInscription"/>
<xsd:element name="identificationTitulaire" type="cpf:identificationTitulaire"/>
<xsd:element name="verbatim" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="niveauNumeriqueEuropeen">
<xsd:all>
<xsd:element name="scoreGeneral" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="1000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="resultats" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="resultat" type="cpf:resultat" minOccurs="0"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="resultat">
<xsd:all>
<xsd:element name="niveau" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="domaineCompetenceId" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="competenceId" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="modalitesInscription">
<xsd:all>
<xsd:element name="modaliteAcces" type="cpf:modaliteAcces" nillable="true"/>
<xsd:element name="voieAccessVAE" type="cpf:voieAccesVAE" minOccurs="0"/>
<xsd:element name="initiativeInscription" type="cpf:initiativeInscription" minOccurs="0"/>
<xsd:element name="dateInscription" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="identificationTitulaire">
<xsd:sequence>
<xsd:choice>
<xsd:element name="dossierFormation" type="cpf:dossierFormation"/>
<xsd:element name="titulaire" type="cpf:titulaire"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="dossierFormation">
<xsd:all>
<xsd:element name="idDossier">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="13"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="nomTitulaire">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom1Titulaire">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="titulaire">
<xsd:all>
<xsd:element name="nomNaissance">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="nomUsage" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom2" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom3" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="anneeNaissance">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1900"/>
<xsd:maxInclusive value="2099"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="moisNaissance" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="12"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="jourNaissance" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="31"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="sexe" type="cpf:genre"/>
<xsd:element name="codeCommuneNaissance" type="cpf:codeCommuneNaissance"/>
<xsd:element name="libelleCommuneNaissance" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="codePaysNaissance" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="3"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="libellePaysNaissance" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="commentairesMEN" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="250"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="codeCommuneNaissance">
<xsd:sequence>
<xsd:choice>
<xsd:element name="codeInseeNaissance" type="cpf:codeInsee"/>
<xsd:element name="codePostalNaissance" type="cpf:codePostal"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="codeInsee">
<xsd:sequence>
<xsd:element name="codeInsee">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="5"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="codePostal">
<xsd:sequence>
<xsd:element name="codePostal" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="flux" type="cpf:flux"/>
<xsd:simpleType name="natureDeposant">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CERTIFICATEUR"/>
<xsd:enumeration value="TIERS_CONFIANCE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="obtentionCertification">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="PAR_ADMISSION"/>
<xsd:enumeration value="PAR_SCORING"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="modalitePassageExamen">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A_DISTANCE"/>
<xsd:enumeration value="EN_PRESENTIEL"/>
<xsd:enumeration value="MIXTE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="niveauCECRL">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A1"/>
<xsd:enumeration value="A2"/>
<xsd:enumeration value="B1"/>
<xsd:enumeration value="B2"/>
<xsd:enumeration value="C1"/>
<xsd:enumeration value="C2"/>
<xsd:enumeration value="INSUFFISANT"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="mention">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="SANS_MENTION"/>
<xsd:enumeration value="MENTION_ASSEZ_BIEN"/>
<xsd:enumeration value="MENTION_BIEN"/>
<xsd:enumeration value="MENTION_TRES_BIEN"/>
<xsd:enumeration value="MENTION_TRES_BIEN_AVEC_FELICITATIONS_DU_JURY"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="modaliteAcces">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="FORMATION_INITIALE_HORS_APPRENTISSAGE"/>
<xsd:enumeration value="FORMATION_INITIALE_APPRENTISSAGE"/>
<xsd:enumeration value="FORMATION_CONTINUE_HORS_CONTRAT_DE_PROFESSIONNALISATION"/>
<xsd:enumeration value="FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION"/>
<xsd:enumeration value="VAE"/>
<xsd:enumeration value="EQUIVALENCE_DIPLOME_ETRANGER"/>
<xsd:enumeration value="CANDIDAT_LIBRE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="voieAccesVAE">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CONGES_VAE"/>
<xsd:enumeration value="VAE_CLASSIQUE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="initiativeInscription">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CERTIFIE"/>
<xsd:enumeration value="OF"/>
<xsd:enumeration value="POLE_EMPLOI"/>
<xsd:enumeration value="EMPLOYEUR"/>
<xsd:enumeration value="AUTRE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="genre">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M"/>
<xsd:enumeration value="F"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

42
GUI-Accrochage.py Normal file
View File

@ -0,0 +1,42 @@
import PySimpleGUI as sg
import subprocess
def run_script(script_path):
try:
result = subprocess.run(['python3', script_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return result.stdout.decode('utf-8'), result.stderr.decode('utf-8')
except Exception as e:
return '', str(e)
# Définir le layout de la fenêtre
layout = [
[sg.Text("Conversion du XML", size=(30, 1), justification="center", font=("Arial", 16, "bold"))],
[sg.Text("Préparation du XML :")],
[sg.Button("Executer la conversion"), sg.Button("Validation"), sg.Button("Fermer")],
[sg.Output(size=(50, 20))],
[sg.Text("", size=(50, 1), key="-VALIDATION-RESULT-", text_color="black")] # Ajout d'un élément Text pour les résultats de validation
]
# Créer la fenêtre
window = sg.Window("Accrochage caisse des dépots", layout)
# Boucle d'événements pour traiter les events et obtenir les values
while True:
event, values = window.read()
if event == "Executer la conversion":
stdout, stderr = run_script('Accrochage.py')
print(stdout)
if stderr:
print("Erreur:", stderr)
elif event == "Validation":
stdout, stderr = run_script('validation.py')
if not stderr:
window["-VALIDATION-RESULT-"].update("Fichier valide", text_color="lime")
else:
window["-VALIDATION-RESULT-"].update("Erreur de validation,consulter le l'affichage...", text_color="red")
print(stdout if stdout else stderr)
elif event == sg.WIN_CLOSED or event == "Fermer":
break
window.close()

52
GUI-convert_csv-xml.py Normal file
View File

@ -0,0 +1,52 @@
import csv
import os
import subprocess
import PySimpleGUI as sg
csv_file = 'Dico2.csv'
# Vérifiez le système d'exploitation pour déterminer la commande appropriée pour effacer l'écran
if os.name == 'posix': # Linux ou macOS
subprocess.run(['clear'], text=True, encoding='utf-8', check=False)
elif os.name == 'nt': # Windows
subprocess.run(['cls'], text=True, encoding='utf-8', check=False)
# Créez une liste vide pour stocker les lignes du CSV
csv_data = []
# Ouverture du fichier CSV en mode lecture
with open(csv_file, 'r', encoding='utf-8') as csvfile:
# Créer un objet reader
csvreader = csv.reader(csvfile)
# Parcourir les lignes du fichier CSV et les ajouter à la liste csv_data
for row in csvreader:
csv_data.append(row)
# Créer une interface utilisateur simple pour afficher les données
layout = [
[sg.Text('Balises :'), sg.Text('', size=(30, 1), key='balises')],
[sg.Text('Nombre d\'éléments :'), sg.Text('', size=(30, 1), key='nb_elements')],
[sg.Button('Afficher la deuxième ligne'), sg.Button('Afficher la cinquième ligne'), sg.Exit()]
]
window = sg.Window('Affichage de données CSV', layout)
while True:
event, values = window.read()
if event == sg.WINDOW_CLOSED or event == 'Exit':
break
elif event == 'Afficher la deuxième ligne':
if len(csv_data) >= 2:
window['balises'].update(', '.join(csv_data[1]))
window['nb_elements'].update(len(csv_data[1]))
else:
sg.popup_error("Le fichier CSV ne contient pas assez de lignes pour accéder à l'indice 1.")
elif event == 'Afficher la cinquième ligne':
if len(csv_data) >= 5:
window['balises'].update(', '.join(csv_data[4]))
window['nb_elements'].update(len(csv_data[4]))
else:
sg.popup_error("Le fichier CSV ne contient pas assez de lignes pour accéder à l'indice 4.")
window.close()

159
convert_csv-xml.py Normal file
View File

@ -0,0 +1,159 @@
import xml.etree.ElementTree as ET
import csv
import random
import logging
import datetime
import subprocess
import pytz
import os
# Emplacement du fichier CSV et XML
csv_file = "Dico2.csv"
xml_file = "file.xml"
tz_paris = pytz.timezone('Europe/Paris')
#Efface la console
def clear_console():
os.system('cls' if os.name == 'nt' else 'clear')
clear_console()
# Configuration du logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
def indent(elem, level=0):
""" Ajoute des indentations aux éléments pour une meilleure lisibilité du fichier XML. """
i = "\n" + level * " "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + " "
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in elem:
indent(elem, level + 1)
if not elem.tail or not elem.tail.strip():
elem.tail = i
else:
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
# Fonction pour lire les données CSV et générer le fichier XML
def create_xml_from_csv(csv_filepath, xml_filepath):
logging.info("Ouverture du CSV...")
# Ouvrir le fichier CSV pour la lecture
with open(csv_filepath, newline='', encoding='utf-8') as csvfile:
reader = csv.reader(csvfile)
Allrows = list(reader)
# Vérification de la présence des données nécessaires
if len(Allrows) < 5:
logging.error("Les données CSV requises sont manquantes.")
exit()
headers = Allrows[4][2:] # Sauter les deux premiers en-têtes
logging.info("Création de l'arborescence du fichier XML...")
# Créer l'élément racine avec l'espace de noms 'cpf'
root = ET.Element("cpf:flux")
root.set("xmlns:cpf", "urn:cdc:cpf:pc5:schema:1.0.0")
root.set("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance")
#Reglage du fuseau horaire
now = datetime.datetime.now(tz_paris)
value = now.strftime("%Y-%m-%dT%H:%M:%S+01:00")
ET.SubElement(root, "cpf:idFlux").text = headers[0]
#str(random.randint(1000000000, 99999999999))
ET.SubElement(root, "cpf:horodatage").text = value
# Création et ajout de l'élément emetteur
emetteur = ET.SubElement(root, "cpf:emetteur")
logging.info("Emmetteur du fchier ...")
# Création de la structure des certificateurs
idClient = str(random.randint(10000000, 99999999)) if Allrows[5][2] == '' else Allrows[5][2]
ET.SubElement(emetteur, "cpf:idClient").text = idClient
certificateurs = ET.SubElement(emetteur, "cpf:certificateurs")
certificateur = ET.SubElement(certificateurs, "cpf:certificateur")
logging.info(f"Certificateur {idClient}...")
# Traitement pour NumClient pour le certificateur
idClient2 = str(random.randint(10000000, 99999999)) if Allrows[5][3] == '' else Allrows[5][3]
ET.SubElement(certificateur, "cpf:idClient").text = idClient2
# Traitement pour NumContrat pour le certificateur
idContrat = str(random.randint(10000000, 99999999)) if Allrows[5][4] == '' else Allrows[5][4]
ET.SubElement(certificateur, "cpf:idContrat").text = idContrat
# Création de la structure des certifications
certifications = ET.SubElement(certificateur, "cpf:certifications")
certification = ET.SubElement(certifications, "cpf:certification")
ET.SubElement(certification, "cpf:type").text = headers[5]
ET.SubElement(certification, "cpf:code").text = headers[6]
# Ajout d'un seul passage de certification
passage_certifications = ET.SubElement(certification, "cpf:passageCertifications")
# Itérer sur chaque ligne du fichier CSV
for row in Allrows[5:]:
# Sauter les lignes vides
if not row[0].strip():
continue
#Ajout des certifications
logging.info(f"Ajout des certifications : {row[7]}")
passage_certification = ET.SubElement(passage_certifications, "cpf:passageCertification")
ET.SubElement(passage_certification, "cpf:idTechnique").text = row[7]
ET.SubElement(passage_certification, "cpf:obtentionCertification").text = row[8]
ET.SubElement(passage_certification, "cpf:donneeCertifiee").text = row[9]
ET.SubElement(passage_certification, "cpf:dateDebutValidite").text = row[10]
# Vérification si la date de fin de validité est 'nil;'
if row[11].strip().lower() == 'nil':
ET.SubElement(passage_certification, "cpf:dateFinValidite", {"xsi:nil": "true"})
else:
ET.SubElement(passage_certification, "cpf:dateFinValidite").text = row[11]
ET.SubElement(passage_certification, "cpf:presenceNiveauLangueEuro").text = row[12]
ET.SubElement(passage_certification, "cpf:presenceNiveauNumeriqueEuro").text = row[13]
if row[14].strip().lower() == 'nil':
ET.SubElement(passage_certification, "cpf:scoring", {"xsi:nil": "true"})
else:
ET.SubElement(passage_certification, "cpf:scoring").text = row[14]
if row[15].strip().lower() == 'nil':
ET.SubElement(passage_certification, "cpf:mentionValidee", {"xsi:nil": "true"})
else:
ET.SubElement(passage_certification, "cpf:mentionValidee").text = row[15]
# Modalite inscription
modalites_inscription = ET.SubElement(passage_certification, "cpf:modalitesInscription")
ET.SubElement(modalites_inscription, "cpf:modaliteAcces").text = row[16]
#Identification Titulaire
identification_titulaire = ET.SubElement(passage_certification, "cpf:identificationTitulaire")
titulaire = ET.SubElement(identification_titulaire, "cpf:titulaire")
logging.info(f"Titulaire : {row[18]} {row[19]}")
ET.SubElement(titulaire, "cpf:nomNaissance").text = row[17]
ET.SubElement(titulaire, "cpf:nomUsage").text = row[18]
ET.SubElement(titulaire, "cpf:prenom1").text = row[19]
ET.SubElement(titulaire, "cpf:anneeNaissance").text = row[20]
ET.SubElement(titulaire, "cpf:moisNaissance").text = row[21]
ET.SubElement(titulaire, "cpf:jourNaissance").text = row[22]
ET.SubElement(titulaire, "cpf:sexe").text = row[23]
code_commune_naissance = ET.SubElement(titulaire, "cpf:codeCommuneNaissance")
code_postal_naissance = ET.SubElement(code_commune_naissance, "cpf:codePostalNaissance")
ET.SubElement(code_postal_naissance, "cpf:codePostal").text = row[24]
# Appliquer l'indentation
indent(root)
# Enregistrement du fichier XML
logging.info(f"Ecriture du XML...")
tree = ET.ElementTree(root)
with open(xml_filepath, "wb") as file:
tree.write(file, encoding="utf-8", xml_declaration=True)
# Appel de la fonction pour créer le fichier XML
create_xml_from_csv(csv_file, xml_file)
logging.info("Fichier XML créé avec succès.")

190
example.xml Normal file
View File

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<cpf:flux xmlns:cpf="urn:cdc:cpf:pc5:schema:1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<cpf:idFlux>6e3c7378-bda4-497a-9bd6-dc203f903ed9</cpf:idFlux>
<cpf:horodatage>2020-12-18T14:24:12+01:00</cpf:horodatage>
<cpf:emetteur>
<cpf:idClient>AB123CDE</cpf:idClient>
<cpf:certificateurs>
<cpf:certificateur>
<cpf:idClient>E564ACB0</cpf:idClient>
<cpf:idContrat>2560080000127J</cpf:idContrat>
<cpf:certifications>
<cpf:certification>
<cpf:type>RNCP</cpf:type>
<cpf:code>RNCP19117</cpf:code>
<cpf:natureDeposant>CERTIFICATEUR</cpf:natureDeposant>
<cpf:passageCertifications>
<cpf:passageCertification>
<cpf:idTechnique>db855769-bcd6-4253-93cf-e666db666c0a</cpf:idTechnique>
<cpf:urlPreuve>https://www.google.fr</cpf:urlPreuve>
<cpf:libelleOption>Mention spéciale</cpf:libelleOption>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutExamen>2020-12-20</cpf:dateDebutExamen>
<cpf:dateFinExamen>2020-12-22</cpf:dateFinExamen>
<cpf:modalitePassageExamen>EN_PRESENTIEL</cpf:modalitePassageExamen>
<cpf:codePostalCentreExamen>75009</cpf:codePostalCentreExamen>
<cpf:dateDebutValidite>2020-12-12</cpf:dateDebutValidite>
<cpf:dateFinValidite xsi:nil="true"></cpf:dateFinValidite>
<cpf:presenceNiveauLangueEuro>true</cpf:presenceNiveauLangueEuro>
<cpf:niveauLangueEuropeen>A1</cpf:niveauLangueEuropeen>
<cpf:presenceNiveauNumeriqueEuro>true</cpf:presenceNiveauNumeriqueEuro>
<cpf:niveauNumeriqueEuropeen>
<cpf:scoreGeneral>890</cpf:scoreGeneral>
<cpf:resultats>
<cpf:resultat>
<cpf:niveau>5</cpf:niveau>
<cpf:domaineCompetenceId>3</cpf:domaineCompetenceId>
<cpf:competenceId>4</cpf:competenceId>
</cpf:resultat>
<cpf:resultat>
<cpf:niveau>7</cpf:niveau>
<cpf:domaineCompetenceId>1</cpf:domaineCompetenceId>
<cpf:competenceId>1</cpf:competenceId>
</cpf:resultat>
</cpf:resultats>
</cpf:niveauNumeriqueEuropeen>
<cpf:scoring>12.4</cpf:scoring>
<cpf:mentionValidee>MENTION_ASSEZ_BIEN</cpf:mentionValidee>
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_INITIALE_APPRENTISSAGE</cpf:modaliteAcces>
<cpf:voieAccessVAE>VAE_CLASSIQUE</cpf:voieAccessVAE>
<cpf:initiativeInscription>CERTIFIE</cpf:initiativeInscription>
<cpf:dateInscription>2019-02-10</cpf:dateInscription>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>Dupont</cpf:nomNaissance>
<cpf:nomUsage>Dupont</cpf:nomUsage>
<cpf:prenom1>Antoine</cpf:prenom1>
<cpf:prenom2>Julien</cpf:prenom2>
<cpf:prenom3>Philippe</cpf:prenom3>
<cpf:anneeNaissance>1996</cpf:anneeNaissance>
<cpf:moisNaissance>11</cpf:moisNaissance>
<cpf:jourNaissance>15</cpf:jourNaissance>
<cpf:sexe>M</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codeInseeNaissance>
<cpf:codeInsee>31555</cpf:codeInsee>
</cpf:codeInseeNaissance>
</cpf:codeCommuneNaissance>
<cpf:libelleCommuneNaissance>Toulouse</cpf:libelleCommuneNaissance>
<cpf:libellePaysNaissance>France</cpf:libellePaysNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
<cpf:verbatim>TOSA</cpf:verbatim>
</cpf:passageCertification>
<cpf:passageCertification>
<cpf:idTechnique>10c54fd2-f3a3-4dea-b975-4d7258bd10b3</cpf:idTechnique>
<cpf:urlPreuve>https://www.google.fr</cpf:urlPreuve>
<cpf:libelleOption>Mention spéciale</cpf:libelleOption>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutExamen>2020-12-20</cpf:dateDebutExamen>
<cpf:dateFinExamen>2020-12-22</cpf:dateFinExamen>
<cpf:modalitePassageExamen>EN_PRESENTIEL</cpf:modalitePassageExamen>
<cpf:codePostalCentreExamen>75009</cpf:codePostalCentreExamen>
<cpf:dateDebutValidite>2020-12-12</cpf:dateDebutValidite>
<cpf:dateFinValidite>2030-12-13</cpf:dateFinValidite>
<cpf:presenceNiveauLangueEuro>true</cpf:presenceNiveauLangueEuro>
<cpf:niveauLangueEuropeen>A1</cpf:niveauLangueEuropeen>
<cpf:presenceNiveauNumeriqueEuro>true</cpf:presenceNiveauNumeriqueEuro>
<cpf:niveauNumeriqueEuropeen>
<cpf:scoreGeneral>890</cpf:scoreGeneral>
<cpf:resultats>
<cpf:resultat>
<cpf:niveau>5</cpf:niveau>
<cpf:domaineCompetenceId>3</cpf:domaineCompetenceId>
<cpf:competenceId>4</cpf:competenceId>
</cpf:resultat>
<cpf:resultat>
<cpf:niveau>7</cpf:niveau>
<cpf:domaineCompetenceId>1</cpf:domaineCompetenceId>
<cpf:competenceId>1</cpf:competenceId>
</cpf:resultat>
</cpf:resultats>
</cpf:niveauNumeriqueEuropeen>
<cpf:scoring>12.4</cpf:scoring>
<cpf:mentionValidee>MENTION_ASSEZ_BIEN</cpf:mentionValidee>
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_INITIALE_APPRENTISSAGE</cpf:modaliteAcces>
<cpf:voieAccessVAE>VAE_CLASSIQUE</cpf:voieAccessVAE>
<cpf:initiativeInscription>CERTIFIE</cpf:initiativeInscription>
<cpf:dateInscription>2019-02-10</cpf:dateInscription>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:dossierFormation>
<cpf:idDossier>1234567891011</cpf:idDossier>
<cpf:nomTitulaire>Dupont</cpf:nomTitulaire>
<cpf:prenom1Titulaire>Antoine</cpf:prenom1Titulaire>
</cpf:dossierFormation>
</cpf:identificationTitulaire>
<cpf:verbatim>TOSA</cpf:verbatim>
</cpf:passageCertification>
<cpf:passageCertification>
<cpf:idTechnique>0785a873-acf7-4632-ad7b-b11cfff05b13</cpf:idTechnique>
<cpf:urlPreuve>https://www.google.fr</cpf:urlPreuve>
<cpf:libelleOption>Mention spéciale</cpf:libelleOption>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutExamen>2020-12-20</cpf:dateDebutExamen>
<cpf:dateFinExamen>2020-12-22</cpf:dateFinExamen>
<cpf:modalitePassageExamen>EN_PRESENTIEL</cpf:modalitePassageExamen>
<cpf:codePostalCentreExamen>75009</cpf:codePostalCentreExamen>
<cpf:dateDebutValidite>2020-12-12</cpf:dateDebutValidite>
<cpf:dateFinValidite>2030-12-13</cpf:dateFinValidite>
<cpf:presenceNiveauLangueEuro>true</cpf:presenceNiveauLangueEuro>
<cpf:niveauLangueEuropeen>A1</cpf:niveauLangueEuropeen>
<cpf:presenceNiveauNumeriqueEuro>true</cpf:presenceNiveauNumeriqueEuro>
<cpf:niveauNumeriqueEuropeen>
<cpf:scoreGeneral>890</cpf:scoreGeneral>
<cpf:resultats>
<cpf:resultat>
<cpf:niveau>7</cpf:niveau>
<cpf:domaineCompetenceId>1</cpf:domaineCompetenceId>
<cpf:competenceId>1</cpf:competenceId>
</cpf:resultat>
<cpf:resultat>
<cpf:niveau>5</cpf:niveau>
<cpf:domaineCompetenceId>3</cpf:domaineCompetenceId>
<cpf:competenceId>4</cpf:competenceId>
</cpf:resultat>
</cpf:resultats>
</cpf:niveauNumeriqueEuropeen>
<cpf:scoring>12.4</cpf:scoring>
<cpf:mentionValidee>MENTION_ASSEZ_BIEN</cpf:mentionValidee>
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_INITIALE_APPRENTISSAGE</cpf:modaliteAcces>
<cpf:voieAccessVAE>VAE_CLASSIQUE</cpf:voieAccessVAE>
<cpf:initiativeInscription>CERTIFIE</cpf:initiativeInscription>
<cpf:dateInscription>2019-02-10</cpf:dateInscription>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>Dupont</cpf:nomNaissance>
<cpf:nomUsage>Dupont</cpf:nomUsage>
<cpf:prenom1>Antoine</cpf:prenom1>
<cpf:prenom2>Julien</cpf:prenom2>
<cpf:prenom3>Philippe</cpf:prenom3>
<cpf:anneeNaissance>1996</cpf:anneeNaissance>
<cpf:moisNaissance>11</cpf:moisNaissance>
<cpf:jourNaissance>15</cpf:jourNaissance>
<cpf:sexe>M</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codeInseeNaissance>
<cpf:codeInsee>31555</cpf:codeInsee>
</cpf:codeInseeNaissance>
</cpf:codeCommuneNaissance>
<cpf:libelleCommuneNaissance>Toulouse</cpf:libelleCommuneNaissance>
<cpf:libellePaysNaissance>France</cpf:libellePaysNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
<cpf:verbatim>TOSA</cpf:verbatim>
</cpf:passageCertification>
</cpf:passageCertifications>
</cpf:certification>
</cpf:certifications>
</cpf:certificateur>
</cpf:certificateurs>
</cpf:emetteur>
</cpf:flux>

142
file.xml Normal file
View File

@ -0,0 +1,142 @@
<?xml version='1.0' encoding='utf-8'?>
<cpf:flux xmlns:cpf="urn:cdc:cpf:pc5:schema:1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<cpf:idFlux>idClient</cpf:idFlux>
<cpf:horodatage>2024-01-11T13:24:05+01:00</cpf:horodatage>
<cpf:emetteur>
<cpf:idClient>86478630</cpf:idClient>
<cpf:certificateurs>
<cpf:certificateur>
<cpf:idClient>71541698</cpf:idClient>
<cpf:idContrat>40802928</cpf:idContrat>
<cpf:certifications>
<cpf:certification>
<cpf:type>idTechnique</cpf:type>
<cpf:code>obtentionCertification</cpf:code>
<cpf:passageCertifications>
<cpf:passageCertification>
<cpf:idTechnique>#VALEUR !</cpf:idTechnique>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutValidite>2022-01-18</cpf:dateDebutValidite>
<cpf:dateFinValidite xsi:nil="true" />
<cpf:presenceNiveauLangueEuro>false</cpf:presenceNiveauLangueEuro>
<cpf:presenceNiveauNumeriqueEuro>false</cpf:presenceNiveauNumeriqueEuro>
<cpf:scoring xsi:nil="true" />
<cpf:mentionValidee xsi:nil="true" />
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION</cpf:modaliteAcces>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>toto</cpf:nomNaissance>
<cpf:nomUsage>toto</cpf:nomUsage>
<cpf:prenom1>test1</cpf:prenom1>
<cpf:anneeNaissance>1980</cpf:anneeNaissance>
<cpf:moisNaissance>7</cpf:moisNaissance>
<cpf:jourNaissance>1</cpf:jourNaissance>
<cpf:sexe>M</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codePostalNaissance>
<cpf:codePostal>75001</cpf:codePostal>
</cpf:codePostalNaissance>
</cpf:codeCommuneNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
</cpf:passageCertification>
<cpf:passageCertification>
<cpf:idTechnique>#VALEUR !</cpf:idTechnique>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutValidite>2022-01-19</cpf:dateDebutValidite>
<cpf:dateFinValidite xsi:nil="true" />
<cpf:presenceNiveauLangueEuro>false</cpf:presenceNiveauLangueEuro>
<cpf:presenceNiveauNumeriqueEuro>false</cpf:presenceNiveauNumeriqueEuro>
<cpf:scoring xsi:nil="true" />
<cpf:mentionValidee xsi:nil="true" />
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION</cpf:modaliteAcces>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>tata</cpf:nomNaissance>
<cpf:nomUsage>tata</cpf:nomUsage>
<cpf:prenom1>test2</cpf:prenom1>
<cpf:anneeNaissance>1981</cpf:anneeNaissance>
<cpf:moisNaissance>8</cpf:moisNaissance>
<cpf:jourNaissance>2</cpf:jourNaissance>
<cpf:sexe>F</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codePostalNaissance>
<cpf:codePostal>75002</cpf:codePostal>
</cpf:codePostalNaissance>
</cpf:codeCommuneNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
</cpf:passageCertification>
<cpf:passageCertification>
<cpf:idTechnique>#VALEUR !</cpf:idTechnique>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutValidite>2022-01-20</cpf:dateDebutValidite>
<cpf:dateFinValidite xsi:nil="true" />
<cpf:presenceNiveauLangueEuro>false</cpf:presenceNiveauLangueEuro>
<cpf:presenceNiveauNumeriqueEuro>false</cpf:presenceNiveauNumeriqueEuro>
<cpf:scoring xsi:nil="true" />
<cpf:mentionValidee xsi:nil="true" />
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION</cpf:modaliteAcces>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>titi</cpf:nomNaissance>
<cpf:nomUsage>titi</cpf:nomUsage>
<cpf:prenom1>test3</cpf:prenom1>
<cpf:anneeNaissance>1982</cpf:anneeNaissance>
<cpf:moisNaissance>9</cpf:moisNaissance>
<cpf:jourNaissance>3</cpf:jourNaissance>
<cpf:sexe>F</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codePostalNaissance>
<cpf:codePostal>75003</cpf:codePostal>
</cpf:codePostalNaissance>
</cpf:codeCommuneNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
</cpf:passageCertification>
<cpf:passageCertification>
<cpf:idTechnique>#VALEUR !</cpf:idTechnique>
<cpf:obtentionCertification>PAR_ADMISSION</cpf:obtentionCertification>
<cpf:donneeCertifiee>true</cpf:donneeCertifiee>
<cpf:dateDebutValidite>2022-01-21</cpf:dateDebutValidite>
<cpf:dateFinValidite xsi:nil="true" />
<cpf:presenceNiveauLangueEuro>false</cpf:presenceNiveauLangueEuro>
<cpf:presenceNiveauNumeriqueEuro>false</cpf:presenceNiveauNumeriqueEuro>
<cpf:scoring xsi:nil="true" />
<cpf:mentionValidee xsi:nil="true" />
<cpf:modalitesInscription>
<cpf:modaliteAcces>FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION</cpf:modaliteAcces>
</cpf:modalitesInscription>
<cpf:identificationTitulaire>
<cpf:titulaire>
<cpf:nomNaissance>tonton</cpf:nomNaissance>
<cpf:nomUsage>tonton</cpf:nomUsage>
<cpf:prenom1>test4</cpf:prenom1>
<cpf:anneeNaissance>1983</cpf:anneeNaissance>
<cpf:moisNaissance>10</cpf:moisNaissance>
<cpf:jourNaissance>4</cpf:jourNaissance>
<cpf:sexe>M</cpf:sexe>
<cpf:codeCommuneNaissance>
<cpf:codePostalNaissance>
<cpf:codePostal>75004</cpf:codePostal>
</cpf:codePostalNaissance>
</cpf:codeCommuneNaissance>
</cpf:titulaire>
</cpf:identificationTitulaire>
</cpf:passageCertification>
</cpf:passageCertifications>
</cpf:certification>
</cpf:certifications>
</cpf:certificateur>
</cpf:certificateurs>
</cpf:emetteur>
</cpf:flux>

1130
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

8
package.json Normal file
View File

@ -0,0 +1,8 @@
{
"dependencies": {
"three": "^0.160.0"
},
"devDependencies": {
"vite": "^5.0.11"
}
}

40
setup.bat Normal file
View File

@ -0,0 +1,40 @@
@echo off
:: Vérifie si Python est déjà installé
python --version >nul 2>&1
if %ERRORLEVEL% equ 0 (
echo Python est déjà installé.
goto :InstallPackages
)
:: Télécharge l'installateur Python (ajustez la version si nécessaire)
echo Téléchargement de l'installateur Python...
bitsadmin /transfer "DownloadPythonInstaller" https://www.python.org/ftp/python/3.9.6/python-3.9.6-amd64.exe "%CD%\python-installer.exe"
:: Installe Python (ajoutez la version que vous souhaitez installer)
echo Installation de Python...
start /wait "" "%CD%\python-installer.exe" /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
:: Vérifie si l'installation de Python a réussi
python --version >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo L'installation de Python a échoué.
exit /b 1
)
:InstallPackages
echo Installation des packages nécessaires...
:: Mise à jour de pip
python -m pip install --upgrade pip
:: Installation des packages avec pip
pip install lxml
pip install pytz
pip install pysimplegui
mkdir Accrochage
echo Installation terminée.
pause
exit /b 0

34
validation.py Normal file
View File

@ -0,0 +1,34 @@
from lxml import etree
import sys
# Emplacement du fichier CSV et XML
xsdfile = "validation.xsd"
xmlfile = "file.xml"
def valider_xml(xml_path, xsd_path):
try:
# Charger le schéma XSD
with open(xsd_path, 'rb') as schema_file:
schema_root = etree.XML(schema_file.read())
schema = etree.XMLSchema(schema_root)
# Parser avec prise en compte des namespaces
parser = etree.XMLParser(ns_clean=True)
# Charger le fichier XML en mode binaire avec le parser
with open(xml_path, 'rb') as xml_file:
xml_doc = etree.parse(xml_file, parser)
# Valider le fichier XML
schema.assertValid(xml_doc)
print("Le fichier XML est valide.")
except etree.XMLSchemaError as e:
print("Erreur de schéma XSD:", e)
except etree.DocumentInvalid as e:
print("Le fichier XML est invalide:", e)
except Exception as e:
print("Erreur lors de la validation du fichier XML:", e)
valider_xml(xmlfile, xsdfile)

489
validation.xsd Normal file
View File

@ -0,0 +1,489 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:cpf="urn:cdc:cpf:pc5:schema:1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:cdc:cpf:pc5:schema:1.0.0" elementFormDefault="qualified" version="1.1.2">
<xsd:complexType name="flux">
<xsd:all>
<xsd:element name="idFlux">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="horodatage">
<xsd:simpleType>
<xsd:restriction base="xsd:dateTime">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9](\+|-)(:2[0-3]|[01][0-9]):[0-5][0-9]"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="emetteur" type="cpf:emetteur"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="emetteur">
<xsd:all>
<xsd:element name="idClient">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="certificateurs" type="cpf:certificateurs"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="certificateurs">
<xsd:all>
<xsd:element name="certificateur" type="cpf:certificateur"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="certificateur">
<xsd:all>
<xsd:element name="idClient">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="idContrat">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="certifications">
<xsd:complexType>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="certification" type="cpf:certification"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="certification">
<xsd:all>
<xsd:element name="type">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="code">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="natureDeposant" type="cpf:natureDeposant" minOccurs="0"/>
<xsd:element name="passageCertifications">
<xsd:complexType>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="passageCertification" type="cpf:passageCertification"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="passageCertification">
<xsd:all>
<xsd:element name="idTechnique">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="urlPreuve" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="libelleOption" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="obtentionCertification" type="cpf:obtentionCertification"/>
<xsd:element name="donneeCertifiee" type="xsd:boolean"/>
<xsd:element name="dateDebutExamen" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="dateFinExamen" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="modalitePassageExamen" type="cpf:modalitePassageExamen" minOccurs="0"/>
<xsd:element name="codePostalCentreExamen" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="dateDebutValidite">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="dateFinValidite" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="presenceNiveauLangueEuro" type="xsd:boolean"/>
<xsd:element name="niveauLangueEuropeen" type="cpf:niveauCECRL" minOccurs="0"/>
<xsd:element name="presenceNiveauNumeriqueEuro" type="xsd:boolean"/>
<xsd:element name="niveauNumeriqueEuropeen" type="cpf:niveauNumeriqueEuropeen" minOccurs="0"/>
<xsd:element name="scoring" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="mentionValidee" type="cpf:mention" nillable="true"/>
<xsd:element name="modalitesInscription" type="cpf:modalitesInscription"/>
<xsd:element name="identificationTitulaire" type="cpf:identificationTitulaire"/>
<xsd:element name="verbatim" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="255"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="niveauNumeriqueEuropeen">
<xsd:all>
<xsd:element name="scoreGeneral" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="1000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="resultats" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="resultat" type="cpf:resultat" minOccurs="0"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="resultat">
<xsd:all>
<xsd:element name="niveau" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="domaineCompetenceId" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="competenceId" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="modalitesInscription">
<xsd:all>
<xsd:element name="modaliteAcces" type="cpf:modaliteAcces" nillable="true"/>
<xsd:element name="voieAccessVAE" type="cpf:voieAccesVAE" minOccurs="0"/>
<xsd:element name="initiativeInscription" type="cpf:initiativeInscription" minOccurs="0"/>
<xsd:element name="dateInscription" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:date">
<xsd:pattern value="(19|20)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="identificationTitulaire">
<xsd:sequence>
<xsd:choice>
<xsd:element name="dossierFormation" type="cpf:dossierFormation"/>
<xsd:element name="titulaire" type="cpf:titulaire"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="dossierFormation">
<xsd:all>
<xsd:element name="idDossier">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="13"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="nomTitulaire">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom1Titulaire">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="titulaire">
<xsd:all>
<xsd:element name="nomNaissance">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="nomUsage" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom2" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="prenom3" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="anneeNaissance">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1900"/>
<xsd:maxInclusive value="2099"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="moisNaissance" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="12"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="jourNaissance" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="31"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="sexe" type="cpf:genre"/>
<xsd:element name="codeCommuneNaissance" type="cpf:codeCommuneNaissance"/>
<xsd:element name="libelleCommuneNaissance" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="codePaysNaissance" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="3"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="libellePaysNaissance" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="commentairesMEN" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="250"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="codeCommuneNaissance">
<xsd:sequence>
<xsd:choice>
<xsd:element name="codeInseeNaissance" type="cpf:codeInsee"/>
<xsd:element name="codePostalNaissance" type="cpf:codePostal"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="codeInsee">
<xsd:sequence>
<xsd:element name="codeInsee">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="5"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="codePostal">
<xsd:sequence>
<xsd:element name="codePostal" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="flux" type="cpf:flux"/>
<xsd:simpleType name="natureDeposant">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CERTIFICATEUR"/>
<xsd:enumeration value="TIERS_CONFIANCE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="obtentionCertification">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="PAR_ADMISSION"/>
<xsd:enumeration value="PAR_SCORING"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="modalitePassageExamen">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A_DISTANCE"/>
<xsd:enumeration value="EN_PRESENTIEL"/>
<xsd:enumeration value="MIXTE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="niveauCECRL">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A1"/>
<xsd:enumeration value="A2"/>
<xsd:enumeration value="B1"/>
<xsd:enumeration value="B2"/>
<xsd:enumeration value="C1"/>
<xsd:enumeration value="C2"/>
<xsd:enumeration value="INSUFFISANT"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="mention">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="SANS_MENTION"/>
<xsd:enumeration value="MENTION_ASSEZ_BIEN"/>
<xsd:enumeration value="MENTION_BIEN"/>
<xsd:enumeration value="MENTION_TRES_BIEN"/>
<xsd:enumeration value="MENTION_TRES_BIEN_AVEC_FELICITATIONS_DU_JURY"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="modaliteAcces">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="FORMATION_INITIALE_HORS_APPRENTISSAGE"/>
<xsd:enumeration value="FORMATION_INITIALE_APPRENTISSAGE"/>
<xsd:enumeration value="FORMATION_CONTINUE_HORS_CONTRAT_DE_PROFESSIONNALISATION"/>
<xsd:enumeration value="FORMATION_CONTINUE_CONTRAT_DE_PROFESSIONNALISATION"/>
<xsd:enumeration value="VAE"/>
<xsd:enumeration value="EQUIVALENCE_DIPLOME_ETRANGER"/>
<xsd:enumeration value="CANDIDAT_LIBRE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="voieAccesVAE">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CONGES_VAE"/>
<xsd:enumeration value="VAE_CLASSIQUE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="initiativeInscription">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="CERTIFIE"/>
<xsd:enumeration value="OF"/>
<xsd:enumeration value="POLE_EMPLOI"/>
<xsd:enumeration value="EMPLOYEUR"/>
<xsd:enumeration value="AUTRE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="genre">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="M"/>
<xsd:enumeration value="F"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

5
xml.csv Normal file
View File

@ -0,0 +1,5 @@
cpf:idFlux,cpf:horodatage,cpf:emetteur,cpf:certificateur,cpf:idClient,cpf:idContrat,cpf:type,cpf:code,cpf:idTechnique,cpf:obtentionCertification,cpf:donneeCertifiee,cpf:dateDebutValidite,cpf:dateFinValidite,cpf:presenceNiveauLangueEuro,cpf:presenceNiveauNumeriqueEuro,cpf:scoring,cpf:mentionValidee,cpf:modaliteAcces,cpf:nomNaissance,cpf:nomUsage,cpf:prenom1,cpf:anneeNaissance,cpf:moisNaissance,cpf:jourNaissance,cpf:sexe,cpf:codePostal
1,2024-01-04T14:30:00+01:00,,E564ACB0,AB123CDE,2560080000127J,RNCP,RNCP19117,db855769-bcd6-4253-93cf-e666db666c0a,PAR_ADMISSION,true,2020-12-20,2020-12-22,true,true,12.4,MENTION_ASSEZ_BIEN,FORMATION_INITIALE_APPRENTISSAGE,Dupont,Dupont,Antoine,1996,11,15,M,75009
2,2024-01-04T14:35:00+01:00,,E564ACB0,AB123CDE,2560080000127J,RNCP,RNCP19118,10c54fd2-f3a3-4dea-b975-4d7258bd10b3,PAR_ADMISSION,true,2020-12-20,2030-12-13,true,true,12.4,MENTION_ASSEZ_BIEN,FORMATION_INITIALE_APPRENTISSAGE,Dupont,Dupont,Antoine,1996,11,15,M,75009
3,2024-01-04T14:40:00+01:00,,E564ACB0,AB123CDE,2560080000127J,RNCP,RNCP19119,0785a873-acf7-4632-ad7b-b11cfff05b13,PAR_ADMISSION,true,2020-12-20,2030-12-13,true,true,12.4,MENTION_ASSEZ_BIEN,FORMATION_INITIALE_APPRENTISSAGE,Dupont,Dupont,Antoine,1996,11,15,M,75009
1 cpf:idFlux cpf:horodatage cpf:emetteur cpf:certificateur cpf:idClient cpf:idContrat cpf:type cpf:code cpf:idTechnique cpf:obtentionCertification cpf:donneeCertifiee cpf:dateDebutValidite cpf:dateFinValidite cpf:presenceNiveauLangueEuro cpf:presenceNiveauNumeriqueEuro cpf:scoring cpf:mentionValidee cpf:modaliteAcces cpf:nomNaissance cpf:nomUsage cpf:prenom1 cpf:anneeNaissance cpf:moisNaissance cpf:jourNaissance cpf:sexe cpf:codePostal
2 1 2024-01-04T14:30:00+01:00 E564ACB0 AB123CDE 2560080000127J RNCP RNCP19117 db855769-bcd6-4253-93cf-e666db666c0a PAR_ADMISSION true 2020-12-20 2020-12-22 true true 12.4 MENTION_ASSEZ_BIEN FORMATION_INITIALE_APPRENTISSAGE Dupont Dupont Antoine 1996 11 15 M 75009
3 2 2024-01-04T14:35:00+01:00 E564ACB0 AB123CDE 2560080000127J RNCP RNCP19118 10c54fd2-f3a3-4dea-b975-4d7258bd10b3 PAR_ADMISSION true 2020-12-20 2030-12-13 true true 12.4 MENTION_ASSEZ_BIEN FORMATION_INITIALE_APPRENTISSAGE Dupont Dupont Antoine 1996 11 15 M 75009
4 3 2024-01-04T14:40:00+01:00 E564ACB0 AB123CDE 2560080000127J RNCP RNCP19119 0785a873-acf7-4632-ad7b-b11cfff05b13 PAR_ADMISSION true 2020-12-20 2030-12-13 true true 12.4 MENTION_ASSEZ_BIEN FORMATION_INITIALE_APPRENTISSAGE Dupont Dupont Antoine 1996 11 15 M 75009