Bonjour 'a tous,
je vais tacher de vous expliquer mon probleme (dur de faire simple)
Je veux que mon parseur parcoure un fichier du type docStruct.xml (en parallele d'un fichier docEx.xml) pour former un html qui sera contenu dans STRUCTfinal2.html
on a ce type de structure:
par exemple.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 <message> <group> <group> <segment> <data>
on fait un parcour en profondeur, verifiant 'a chaque fois si le segment, le groupe, etc, sont bien dans le 2eme fichier, docEx.xml. si c'est le cas, on parse alors le noeud en html, avec simple_pars.
la subtilite est que l'on a des references: segmentref est la reference d'un segment comportant le meme id, par exemple. donc quand opn a segmentref, on va chercher dans "segments" et on trouve le bon segment correspondant, et dans celui-ci on fait le meme parcour en profondeur, jusqu'a obtenir une data. si on a une data, on affiche alors la valeur du noeud dans le 2eme fichier (docEx.xml) avec sa definition (codeset)
le probleme c'est que monne fonctionne pas, il n'affiche rien... je ne comprends pas bien, alors que chacune de mes fonctions semble fonctionner. je pense que le probleme vient de la fonction child_pars, mais je n'en suis pas bien sure. ca fait des jours que je tente de comprendre mais en vain, je dois avoir loupe quelque chose.
Code : Sélectionner tout - Visualiser dans une fenêtre à part echo parsage('docStruct.xml', 'docEx.xml', 'STRUCTfinal2.html');
est ce que quelqu'un pourrait essayer de comprendre mon probleme? je vous balance un peu tout comme ca mais je crois que je me suis embrouillee moi-meme...
merci beaucoup d'avance!
ps: dans chaque variable, que ce soit $Snoeud, $Eenfant etc, S signifie que l'on est dans le fichier "docStruct", le premier que l'on parcourt, et E dans le fichier "docEx"
mon parseur en php:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217 <?php function parsage($docStructure, $docExemple, $document2) { $docStruct = new DomDocument; $docStruct->formatOutput = true; $docStruct->preserveWhiteSpace=false; $docStruct->load($docStructure); $docEx = new DomDocument; $docEx->formatOutput = true; $docEx->preserveWhiteSpace=false; $docEx->load($docExemple); $interface=$docStruct->getElementsByTagName('INTERFACE'); $arbre = $interface->item(0); $Smessages = $docStruct->getElementsByTagName('MESSAGE'); $Emessages = $docEx->getElementsByTagName('message'); return pars_message($Smessages, $Emessages, $interface, $document2); } function result_pars($Smessage, $Emessages, $interface){ $resultat = ''; foreach ($interface as $Interface) { $resultat= '<html><link rel="stylesheet" type="text/css" href="style.css" /><body><h2>Message:'.$Smessage->getAttribute('TAG').'</h2><p class="message_desc">'.$Smessage->getAttribute('NAME').'</p>'.child_pars($Interface, $Smessage, $Emessages->item(0))."</body></html>"; return $resultat; } } function pars_message($Smessages, $Emessages, $interface, $document2){ foreach ($Smessages as $Smessage) { if ($Smessage->getAttribute('TAG')==$Emessages->item(0)->getAttribute('type') && $Smessage->getAttribute('VERSION')==$Emessages->item(0)->getAttribute('version') && $Smessage->getAttribute('RELEASE')==$Emessages->item(0)->getAttribute('release')){ $resultat=result_pars($Smessage, $Emessages, $interface); $docStruct2 = new DomDocument; $handle = fopen($document2, 'w'); fwrite($handle, $resultat); fclose($handle); //echo $resultat; $docStruct2->load($resultat); //transformer le string resultat en object comme document_xml pour pouvoir le sauver //$docStruct2->save($document2); return $resultat; } } } function child_pars($tree, $Snoeud, $Enoeud){ // Fonction de parsage d'enfants // Si elle n'a pas encore ete declaree (c'est la premiere balise), on initialise $accumulation if(!isset($accumulation)) {$accumulation = '';} if($Snoeud->hasChildNodes()==true &&$Snoeud->nodeName!="DATA"){ $Senfants_niv1 = $Snoeud->childNodes; // Les enfants du nud traité $Eenfants_niv1 = $Enoeud->childNodes; foreach($Eenfants_niv1 as $Eenfant){ foreach($Senfants_niv1 as $Senfant){ // Pour chaque enfant, on vérifie if($Eenfant->nodeName==$Senfant->getAttribute('SMARTNAME')){ //appartient bien 'a docEx //echo $accumulation; if($Senfant->hasChildNodes() == true && $Senfant->nodeName!="DATA"){ // s'il a lui-même des enfants $accumulation .= child_pars($tree, $Senfant, $Eenfant); // A TESTER car ici on n'a pas d'enfants, dans ce message... } elseif($Senfant->nodeName!="DATA"){ // ... s'il n'en a plus ! if ($Senfant->nodeName=="SEGMENTREF"){ $newNode=traitement_segmentref($tree, $Senfant, $Eenfant); $accumulation .= child_pars($tree, $newNode, $Eenfant); } elseif ($Senfant->nodeName=="COMPOSITEREF"){ $newNode=traitement_compositeref($tree, $Senfant, $Eenfant); $accumulation .= child_pars($tree, $newNode, $Eenfant); } elseif ($Senfant->nodeName=="GROUPREF"){ $newNode=traitement_compositeref($tree, $Senfant, $Eenfant); $accumulation .= child_pars($tree, $newNode, $Eenfant); } } else {$accumulation .= simple_pars($tree, $Senfant, $Eenfant);} // si DATA? ou quand il remonte, est ce qu'il fait ca? avec contenu 'a inserer 'a l'interieur } } } } return simple_pars($tree, $Snoeud, $Enoeud, $accumulation); // accumulation est le resultat du parsage de tous les noeuds: le html se forme } function traitement_segmentref($tree, $Senfant){ $TREE=$tree->childNodes; foreach ($TREE as $arbreSegments) { if ($arbreSegments->nodeName=="SEGMENTS"){ $newNode=search_id($Senfant->getAttribute('ID'), $arbreSegments); //arbreSegments est bien un noeud } } return $newNode; } function traitement_compositeref($tree, $Senfant){ $TREE=$tree->childNodes; foreach ($TREE as $arbreComposites) { if ($arbreComposites->nodeName=="COMPOSITES"){ $newNode=search_id($Senfant->getAttribute('ID'), $arbreComposites); //arbreSegments est bien un noeud } } return $newNode; } function traitement_groupref($tree, $Senfant){ $TREE=$tree->childNodes; foreach ($TREE as $arbreGroups) { if ($arbreGroups->nodeName=="GROUPS"){ $newNode=search_id($Senfant->getAttribute('ID'), $arbreGroups); //arbreSegments est bien un noeud } } return $newNode; } function search_id($id, $noeud){ $fils=$noeud->childNodes; foreach ($fils as $enfant){ if ($enfant->getAttribute('ID')==$id){ return ($enfant); } } return NULL; // au cas ou, si on ne retrouve pas le segment avec le bon id } function traitement_data($Snoeud, $Enoeud){ if ($Snoeud->hasChildNodes()==true){ $codesets = $Snoeud->childNodes; foreach ($codesets as $codes){ if ($codes->nodeName=="CODESETS"){ $codeS = $codes->childNodes; foreach ($codeS as $codeset){ if ($codeset->nodeName=="CODESET"){ if ($codeset->attributes->getNamedItem('TAG')->nodeValue == $Enoeud->nodeValue){ return $contenu=("<p class='data'>".$Snoeud->attributes->getNamedItem('DESCRIPTION')->nodeValue." : ".$Enoeud->nodeValue." ( ".$codeset->attributes->getNamedItem('DESCRIPTION')->nodeValue.")</p><BR>"); } } } } } } } function simple_pars($tree, $Snoeud, $Enoeud, $content_to_insert='') { $balise_1 = array('SEGMENT' => '<div class="segment"><p class="segment_smartname">"$1"</p><p class="segment_description">"$2" ,"$3" </p>', 'COMPOSITE' => '<div class="composite"><p class="composite_smartname">"$1"</p><p class="composite_description">"$2", "$3"</p>', 'GROUP' => '<div class="group"><div class="group_descr"><p class="group_smartname">$1</p><p class="group_description">"$2" , "$3" </p>', 'DATA' => '<div class="data"><p class="DATA_smartname">$1</p><p class="group_description">"$2" , "$3" </p>', '#text' => ''); $balise_2 = array('SEGMENT' => '</div><br>', 'COMPOSITE' => '</div><br>', 'GROUP' => '</div><br>', '#text' => ''); // Tableau des balises fermantes $attributs = array('SEGMENT' => 'DESCRIPTION', 'GROUP' => 'DESCRIPTION', 'COMPOSITE' => 'DESCRIPTION' ); if(!empty($content_to_insert)){ // NON recherche sur le contenu dans Ex!! On détermine si on veut spécifier du contenu préparsé if(!isset($contenu)) $contenu = $content_to_insert; // Si c'est le cas, on met la variable de fonction en contenu //echo "{", $contenu, "}"; } elseif(!isset($contenu)){ $contenu = $Enoeud->nodeValue; } if ($Snoeud->nodeName=="DATA") { $intermediaire=$contenu=traitement_data($Snoeud, $Enoeud); } elseif ($Snoeud->nodeName=="SEGMENT" || $Snoeud->nodeName=="COMPOSITE" || $Snoeud->nodeName=="GROUP" ){ //USEFUL?????????? $first_tag = $balise_1[$Snoeud->nodeName]; // Première balise (ouvrante) if($Snoeud->hasAttributes()){ // On remplace les attributs (sauf pour les images) // hasAttributes:domNode. hasAttribute:domElement if ($Snoeud->hasAttribute('FUNCTION')){ $FUNCTION = $Snoeud->attributes->getNamedItem('FUNCTION')->nodeValue;// Récupération de la valeur de l'attribut } elseif($Snoeud->hasAttribute('TYPENAME')){ $FUNCTION = $Snoeud->attributes->getNamedItem('TYPENAME')->nodeValue; } if ($Snoeud->hasAttribute('NAME')){ $NAME = $Snoeud->attributes->getNamedItem('NAME')->nodeValue; } elseif ($Snoeud->hasAttribute('SMARTNAME')){ $NAME = $Snoeud->attributes->getNamedItem('SMARTNAME')->nodeValue; } if ($Snoeud->hasAttribute('MEANING')){ $MEANING = $Snoeud->attributes->getNamedItem('MEANING')->nodeValue; } elseif ($Snoeud->hasAttribute('DESCRIPTION')){ $MEANING = $Snoeud->attributes->getNamedItem('DESCRIPTION')->nodeValue; } if ($NAME){ // On remplace la valeur $NAME par celle de l'attribut $first_tag = str_replace("$1", $NAME, $first_tag); } if ($FUNCTION){ $first_tag = str_replace("$2", $FUNCTION, $first_tag); } $first_tag = str_replace("$3", $MEANING, $first_tag); } echo $intermediaire = $first_tag . $contenu . $balise_2[$Snoeud->nodeName]; // On assemble le tout } if(!isset($intermediaire)) $intermediaire =''; //echo "[", $intermediaire, "]"; return $intermediaire; // On renvoie le texte parsé } echo parsage('docStruct.xml', 'docEx.xml', 'STRUCTfinal2.html'); // Mettez le nom du fichier XML ?>
style.css:
docStruct.xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126 body { font-family:Times New Roman; } p span.mouseover { display: none; } p:hover span.mouseover { display: block; position: absolute; top: 200px; left: 300px; width: 125px; padding: 5px; margin: 10px; z-index: 100; color: #AAA; background: black; font: 10px Verdana, sans-serif; text-align: center; } span.comp_details span.mouseover { display: none; } span.comp_details:hover span.mouseover { display: block; position: absolute; top: 200px; left: 300px; width: 125px; padding: 5px; margin: 10px; z-index: 100; color: #AAA; background: black; font: 10px Verdana, sans-serif; text-align: center; } .message_desc { font-size: x-large } .group { border: 1px white ; padding-left:20px; width:98%; background-color:#EFEFFB; background: url('degradeS.jpg') repeat-x; -moz-border-radius:25px; } .group_descr { text-align:left; /* border-bottom:1px solid black; trait*/ } .group_description { padding-left:4px; } .group_smartname { font-weight:bold; } .segment { border: 0x black groove; /* cadre */ padding-left:15px; background: url('degradee.jpg') repeat-x; width:98%; } .segment_smartname { font-weight:bold; } .composite { border: 1px rgb(100,150,200) groove; /* cadre */ padding:10px; padding-left:15px; background-color: rgb(230,235,240);; line-height: 0.2; width:98%; } .composite_smartname { font-weight:bold; } table { border-collapse: collapse; line-height: 1.0; } th { background-color: #dedede; border: 1px solid black; } td { border: 1px solid black; } .data { color: maroon; } .clicCacher { top: -20px; position: relative; text-align:right; }
docEx.xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138<?xml version="1.0" encoding="UTF-8"?> <ROOT> <SOURCE>Visual Services 5 - XML Generator</SOURCE> <VERSION>1</VERSION> <INTERFACE NAME="524121" VERSION="55" RELEASE="0" DESCRIPTION="TYGK" EXPORT_AS_DEG="FALSE"> <MESSAGES> <MESSAGE ID="_58096_M_NCMFMT" TAG="CFLICQ" AGENCY="1A" DOMAIN="DCS_FM" VERSION="11" RELEASE="1" REVISION="1" NAME="fujgvj" STATE="Draft" TYPENAME="opopop" SEPARATOR="+" PUBLISHED="false" AREA="68" CHARACTERSET="Default" FUNCTION="fugij" MEANING="hvguguyfg"> <!--blablabla--> </MESSAGE> <MESSAGE ID="5443413" TAG="FDVBHK" AGENCY="1A" DOMAIN="DCS_CM_FLI" VERSION="11" RELEASE="1" REVISION="1" NAME="CM Flight Status/Timing Update Query" STATE="Certified" TYPENAME="EdiFDVBHK1111" SEPARATOR="+" PUBLISHED="true" AREA="115" CHARACTERSET="Default" FUNCTION="CM Flight Status/Timing Update Query" MEANING="Query to update the CM status/timing information of a flight leg date. Also used to update aircraft registraion and to update maximum weight allowance."> <SEGMENTREF ID="7434" SMARTNAME="s1" STATUS="C" REPETITION="1" DESCRIPTION="To convey : - the system log in of the user - id of the terminal in which the message was sent" XMLCOMMENT="" TAG="ORG" AGENCY="IA" DOMAIN="AMA" VERSION="01" RELEASE="2" REVISION="3" DELEGATED="FALSE" STATE="Certified"/> <SEGMENTREF ID="78634" SMARTNAME="s2" STATUS="M" REPETITION="1" DESCRIPTION="To convey: - The operating carrier - The flight number - the suffix - departure port - the local date of departure" XMLCOMMENT="" TAG="FDR" AGENCY="1A" DOMAIN="DCS_FLI_UPDATE" VERSION="02" RELEASE="1" REVISION="23" DELEGATED="FALSE" STATE="Certified"/> <SEGMENTREF ID="7856321" SMARTNAME="s3" STATUS="C" REPETITION="2" DESCRIPTION="s3 sent to CM stating in which version the system is: - SV: Status Version - TV: Timing Version" XMLCOMMENT="" TAG="IRV" AGENCY="1A" DOMAIN="DCS_FM" VERSION="07" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Certified"/> <SEGMENTREF ID="5234" SMARTNAME="s4" STATUS="C" REPETITION="7" DESCRIPTION="To convey : - The local standard time of departure (2005:STD/2005:L) - The local estimated time of departure (2005:ETD/2005:L) - The local actual time of departure (2005:ATD/2005:L) - The local standard time of arrival (2005:STA/2005:L) - The local estimated time of arrival (2005:ETA/2005:L) - The local actual time of arrival (2005:ATA/2005:L)" XMLCOMMENT="" TAG="SDI" AGENCY="1A" DOMAIN="DCS_CM_FLI" VERSION="07" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Certified"/> <SEGMENTREF ID="24217" SMARTNAME="s5" STATUS="C" REPETITION="5" DESCRIPTION="Status information repeated. Possible repetitions: - the flight general status(9015:GN) - the load control status(9015:LC) - Acceptance status(9015:AC) - Flight Baggage Acceptance Status(9015:BG) All status can have a set of the following values : Open,NotOpen,suspended,locked,departed,cancelled,load sheet finalised,finalised,Not opened, closed, finalised, Ignored (1245:OP/NO/SPD/GL/FD/SO/LSF/FI/CL/IG/...)" XMLCOMMENT="" TAG="STX" AGENCY="IA" DOMAIN="DCS_FM_STATUS" VERSION="07" RELEASE="2" REVISION="1" DELEGATED="FALSE" STATE="Certified"/> <GROUP ID="524" TYPENAME="EdiFDVBHK_LocationTerminalId" SMARTNAME="g1" STATUS="C" REPETITION="4" DESCRIPTION="To convey: - the departure Aircraft Location - the departure Aircraft Parking Location " XMLCOMMENT="" TAG="Group" NAME="FDVBHK 1A 07 1 Group 1"> <SEGMENTREF ID="741" SMARTNAME="s6" STATUS="M" REPETITION="1" DESCRIPTION="To convey either: - departure Aircraft Location (1229:DAL) - departure Aircraft Parking Location (1229:DAP) " XMLCOMMENT="" TAG="ACT" AGENCY="IA" DOMAIN="DCS" VERSION="01" RELEASE="2" REVISION="1" DELEGATED="FALSE" STATE="Certified"/> <SEGMENTREF ID="76534" SMARTNAME="s7" STATUS="M" REPETITION="1" DESCRIPTION="To convey either: - the departure location (9932:LOC) - or, the departure gate (9932:GTE) - or, the arrival Location (9932:LOC) - or, the arrival gate (9932:GTE)" XMLCOMMENT="" TAG="TLC" AGENCY="1A" DOMAIN="AMA" VERSION="02" RELEASE="1" REVISION="1" DELEGATED="FALSE" STATE="Draft"/> </GROUP> </MESSAGE> </MESSAGES> <SEGMENTS> <SEGMENT ID="78634" TAG="FDR" AGENCY="1A" DOMAIN="trebgd" VERSION="02" RELEASE="1" REVISION="23" NAME="hbrgdv" STATE="Certified" TYPENAME="EdiFDR_DCS_FLI_UPDATE" DELEGATED="FALSE" AIBSUFFIX="" FUNCTION="To designate a flight for a given date in a reply." MEANING="Changes proposed : 3215 and 3259 set from Mandatory to Conditional"> <COMPOSITEREF ID="7227" SMARTNAME="c1" STATUS="M" REPETITION="1" DESCRIPTION="hbtgfrv" XMLCOMMENT="" TAG="C013" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="566" STATE="Certified"/> <COMPOSITEREF ID="8372" SMARTNAME="c2" STATUS="M" REPETITION="1" DESCRIPTION="grsfve" XMLCOMMENT="" TAG="C014" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="550" STATE="Certified"/> <DATA ID="_634261_D_NCMFMT" SMARTNAME="d2" STATUS="M" REPETITION="1" DESCRIPTION="gweasmdd" XMLCOMMENT="" DATATYPE="n" XMLTYPE="Date_YYYYMMDD" MINLEN="1" MAXLEN="8" PROCESSING="n" TAG="2281" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="783" NAME="Departure date and time" STATE="Certified" FUNCTION="Outbound local date and time of departure." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <DATA ID="_634262_D_NCMFMT" SMARTNAME="d3" STATUS="M*" REPETITION="1" DESCRIPTION="grwes." XMLCOMMENT="" DATATYPE="a" XMLTYPE="" MINLEN="1" MAXLEN="5" PROCESSING="n" TAG="3215" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="986" NAME="Place of departure, coded" STATE="Certified" FUNCTION="Outbound airport/city of departure." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <DATA ID="_634263_D_NCMFMT" SMARTNAME="d4" STATUS="C" REPETITION="1" DESCRIPTION="hg534er" XMLCOMMENT="" DATATYPE="a" XMLTYPE="" MINLEN="1" MAXLEN="5" PROCESSING="n" TAG="3259" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="1136" NAME="Place of destination, coded" STATE="Certified" FUNCTION="Destination airport/city code." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <DATA ID="_634265_D_NCMFMT" SMARTNAME="gj" STATUS="N/A" REPETITION="1" DESCRIPTION="" XMLCOMMENT="" DATATYPE="a" XMLTYPE="" MINLEN="1" MAXLEN="1" PROCESSING="n" TAG="9857" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="550" NAME="Inbound type of service indicator" STATE="Certified" FUNCTION="To specify the type of service on an inbound means of transport." MEANING="" CODED="T" FASTDECODINGFLAG="N" FASTDECODINGID="" EXHAUSTIVE="T"> <CODESETS> </CODESETS> </DATA> <COMPOSITEREF ID="_169264_C_NCMFMT" SMARTNAME="otherc2" STATUS="N/A" REPETITION="1" DESCRIPTION="" XMLCOMMENT="" TAG="C041" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="280" STATE="Certified"/> <COMPOSITEREF ID="_169265_C_NCMFMT" SMARTNAME="cughjv" STATUS="N/A" REPETITION="2" DESCRIPTION="" XMLCOMMENT="" TAG="C310" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="1914" STATE="Certified"/> </SEGMENT> <SEGMENT ID="7856321" TAG="IRV" AGENCY="1A" DOMAIN="DCS_FM" VERSION="07" RELEASE="1" REVISION="1" NAME="ITEM REFERENCES AND s3" STATE="Certified" TYPENAME="EdiIRV_FM" DELEGATED="FALSE" AIBSUFFIX="" FUNCTION="Exchange and link unique identifiers" MEANING="Used to convey one DCS Unique ID."> <DATA ID="_213842_D_NCMFMT" SMARTNAME="uniqueReference" STATUS="N/A" REPETITION="1" DESCRIPTION="uyjmnrgf" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="35" PROCESSING="n" TAG="1154" AGENCY="IA" VERSION="01" RELEASE="0" REVISION="68" NAME="Reference number" STATE="Certified" FUNCTION="concession priority number" MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <COMPOSITEREF ID="_61296_C_NCMFMT" SMARTNAME="c3" STATUS="M*" REPETITION="1" DESCRIPTION="muynjrg" XMLCOMMENT="" TAG="A010" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="627" STATE="Certified"/> </SEGMENT> <SEGMENT ID="741" TAG="ACT" AGENCY="IA" DOMAIN="DCS" VERSION="01" RELEASE="2" REVISION="1" NAME="mnythbgr" STATE="Certified" TYPENAME="EdiDCS" DELEGATED="FALSE" AIBSUFFIX="" FUNCTION="To provide details of action required or taken, the flights to which this action refers, and reasons for action taken." MEANING=""> <DATA ID="_186_D_NCMFMT" SMARTNAME="d8" STATUS="M" REPETITION="1" DESCRIPTION="5ybrgev" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="1229" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="127" NAME="Action request / notification, coded" STATE="Certified" FUNCTION="Code specifying the action to be taken." MEANING="" CODED="T" FASTDECODINGFLAG="N" FASTDECODINGID="" EXHAUSTIVE="T"> <CODESETS> <CODESET TAG="0" DESCRIPTION="4terbs"/> <CODESET TAG="1" DESCRIPTION="btf"/> <CODESET TAG="2" DESCRIPTION="tebrs"/> <CODESET TAG="AAL" DESCRIPTION="ntefb"/> <CODESET TAG="DAL" DESCRIPTION="n64terb"/> </CODESETS> </DATA> </SEGMENT> <SEGMENT ID="5234" TAG="SDI" AGENCY="1A" DOMAIN="DCS_CM_FLI" VERSION="07" RELEASE="1" REVISION="1" NAME="STRUCTURED DATE TIME INFORMATION" STATE="Certified" TYPENAME="EdiSDIs4" DELEGATED="FALSE" AIBSUFFIX="" FUNCTION="This segment is designed to convey date/time in a structured way." MEANING="This segment is used to convey a date and time but no time zone information. - A017 changed to C (in order to be able to delete times)"> </DATA> <COMPOSITEREF ID="_62765_C_NCMFMT" SMARTNAME="gbbfd" STATUS="C" REPETITION="1" DESCRIPTION="Convey date and/or time." XMLCOMMENT="" TAG="A017" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="753" STATE="Certified"/> <COMPOSITEREF ID="_62766_C_NCMFMT" SMARTNAME="rbvfd" STATUS="N/A" REPETITION="1" DESCRIPTION="Reference : IATA SSIM Appendix F If it is not provided, the time is considered to be given in UTC." XMLCOMMENT="" TAG="A019" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="585" STATE="Certified"/> </SEGMENT> </SEGMENTS> <COMPOSITES> <COMPOSITE ID="7227" TAG="C013" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="566" NAME="OUTBOUND CARRIER DETAILS" STATE="Certified" TYPENAME="EdiOutboundc1" FUNCTION="To identify the airline company and an associated airline company." MEANING=""> <DATA ID="_634250_D_NCMFMT" SMARTNAME="d1" STATUS="M*" REPETITION="1" DESCRIPTION="The carrier code." XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="2" PROCESSING="n" TAG="3127" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="781" NAME="Carrier identification" STATE="Certified" FUNCTION="Party undertaking or arranging transport of goods between named points." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <DATA ID="_634250_D_NCMFMT" SMARTNAME="operatingCarrier" STATUS="N/A" REPETITION="1" DESCRIPTION="" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="17" PROCESSING="n" TAG="3127" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="781" NAME="Carrier identification" STATE="Certified" FUNCTION="Party undertaking or arranging transport of goods between named points." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> </COMPOSITE> <COMPOSITE ID="8372" TAG="C014" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="550" NAME="OUTBOUND FLIGHT NUMBER DETAILS" STATE="Certified" TYPENAME="EdiOutboundd10Details" FUNCTION="To specify the flight number and operational suffix of the outbound flight." MEANING=""> <DATA ID="_634251_D_NCMFMT" SMARTNAME="d10" STATUS="M" REPETITION="1" DESCRIPTION="The flight number." XMLCOMMENT="" DATATYPE="n" XMLTYPE="integer" MINLEN="1" MAXLEN="4" PROCESSING="n" TAG="3802" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="636" NAME="Flight number" STATE="Certified" FUNCTION="Number assigned by a carrier to uniquely identify a flight." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <DATA ID="_634252_D_NCMFMT" SMARTNAME="operationalSuffix" STATUS="C" REPETITION="1" DESCRIPTION="The operational suffix." XMLCOMMENT="" DATATYPE="a" XMLTYPE="" MINLEN="1" MAXLEN="1" PROCESSING="n" TAG="9801" AGENCY="IA" VERSION="02" RELEASE="2" REVISION="630" NAME="Operational suffix to the carrier code" STATE="Certified" FUNCTION="To further identify a unique reference to a means of transport." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> </COMPOSITE> <COMPOSITE ID="_61296_C_NCMFMT" TAG="A010" AGENCY="1A" VERSION="02" RELEASE="1" REVISION="627" NAME="Unique id description" STATE="Certified" TYPENAME="EdiUniqueIdDescription" FUNCTION="" MEANING="Standard definition"> <DATA ID="_213840_D_NCMFMT" SMARTNAME="systemQualifier" STATUS="N/A" REPETITION="1" DESCRIPTION="System responsible of the associated version number: - "1ARES" for CS RES system - "DCSLON" for current NGDCS in London -... New values may be added when needed" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="10" PROCESSING="n" TAG="9964" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="189" NAME="Delivering system identification/name" STATE="Certified" FUNCTION="A coded description or name of the system that may originate a message or deliver a message for a third party." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <DATA ID="_213837_D_NCMFMT" SMARTNAME="d6" STATUS="M*" REPETITION="1" DESCRIPTION="version number" XMLCOMMENT="" DATATYPE="n" XMLTYPE="integer" MINLEN="1" MAXLEN="5" PROCESSING="n" TAG="4000" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="200" NAME="Reference version number" STATE="Certified" FUNCTION="To uniquely identify a reference by its revision number." MEANING="" CODED="F" FASTDECODINGFLAG="N" FASTDECODINGID=""> </DATA> <DATA ID="_213841_D_NCMFMT" SMARTNAME="d7" STATUS="M*" REPETITION="1" DESCRIPTION="ID qualifier" XMLCOMMENT="" DATATYPE="an" XMLTYPE="" MINLEN="1" MAXLEN="3" PROCESSING="n" TAG="1153" AGENCY="IA" VERSION="01" RELEASE="2" REVISION="519" NAME="Reference qualifier" STATE="Certified" FUNCTION="Code giving specific meaning to a reference segment or a reference number." MEANING="Note: Use defined code or an ATA/IATA defined Form Of Identification (See AIRIMP 3.11.2)" CODED="T" FASTDECODINGFLAG="N" FASTDECODINGID="" EXHAUSTIVE="T"> <CODESETS> <CODESET TAG="FV" DESCRIPTION="hwrsg"/> <CODESET TAG="SV" DESCRIPTION="gwrs"/> <CODESET TAG="TV" DESCRIPTION="hbwserzd"/> </CODESETS> </DATA> </COMPOSITES> </INTERFACE> </ROOT>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32<?xml version="1.0" encoding="UTF-8"?> <message type="CFSTUQ" agency="1A" version="11" release="1"> <g1> <!-- segment --> <s6> <!-- composite --> <d8>AAL</d8> <!-- data --> </s6> </g1> <s2> <!-- segment --> <c1> <!-- composite --> <d1>TP</d1> <!-- data --> </c1> <c2> <d10>239</d10> </c2> <d2>20111125</d2> <d3>CMN</d3> <d4>LIS</d4> <d2>4532435</d2> </s2> <s3> <c3> <d6>1</d6> <d7>SV</d7> </c3> </s3> <s3> <c3> <d6>0</d6> <d7>TV</d7> </c3> </s3> </message>
Partager