Show last authors
1 == **__Introduction:__** ==
2
3 This connector is used to transform a file. It is a connector allowing to transform a file of another format (CSV, PLAT, - EDIFACT...) to an XML file based using a file called «  **format  **».
4
5
6 == **__Icon:__** ==
7
8
9 [[image:1646134524824-934.png||height="112" width="126"]]
10
11
12 The connector exists in the scenario panel:
13
14 [[image:1.png]]
15
16 == **__Configuration:__** ==
17
18
19 [[image:1646134567096-508.png]]
20
21
22 - To create or modify a transformation connector, you should be on a scenario (new or existing).
23
24
25 - __//Configuration ~://__
26
27 FILE_TO_XML is a transformation connector used to set up the connector, you should click on the blue button above the connector and fill in the properties displayed :
28
29 * //**Name **//: To give a name to the processing step (connector). It is very useful to give meaningful names .
30 * //**Format **//: The XML file allowing to transform the input or output file to XML format or vice versa.  We have several existing standard formats (EDIFACT, X12..)
31 * //**FileName **//: To give a name to the output file of the current step. This step is very useful for the monitoring of the platform.
32 * **//Input & Output Charset//** : to precise the encoding for the files. The default encoding is UTF-8.
33 * **//Condition //**: This field allows you to add a condition to execute the processing step only if the condition is met.
34 * //**Add boundary OnError**// : It is checked only to add an additional treatment in the case of an error on the treatment step.
35
36 == __**Le fichier Format:**__ ==
37
38
39 The format file is mandatory for the connector to work. The iXPath file formats are described in XML and stored in the client environment's format directory.
40
41 The XML format represents the actual hierarchical structure of the file.
42
43 The XML output file will strictly use the tag names and structure defined in the XML structure file.
44
45 In this chapter we will go through all the possible cases of the format file.
46
47 1. (((
48 ==== __**Format Edifact**__ ====
49 )))
50
51 //__**Introduction:**__//
52
53 The Edifact format allows the user to transform an edifact fifile to an xml file respecting.
54
55 XML documents must contain one root element that is the parent of all other elements. This element should exist once in all the document. In general it is a node called "ixDOC".
56
57
58 __//**Elements of the file format:**//__
59
60 Any group of information (even those that are not delimited by characters, a line break or other) must be represented in the document (e.g. groups of EDIFACT segments, Messages, etc.).
61
62
63 **~ Attributes **are considered one of the important elements in the format xml file. They tell the translation processor what actions to take when reading the document. They should be defined globally (ixDOC) or individually on each tag.
64
65
66 All the attributes defined in the "ixDOC" tag will be automatically carried over to all the tags in the format. These are therefore the default attributes. An undefined attribute will take the default value defined in this document. Each attribute should be indicated only if it is really useful. Some attributes can slow down the processing.
67
68
69 (% class="active" %)|(% colspan="2" %)(((
70 ====== **Liste des Attributs de Traitement** ======
71 )))
72 |(((
73 **format**
74
75 //string//
76 )))|(((
77 **Default Value : **«** **none »
78
79 **Description : **Defines how the data will be taken from the file
80
81 * **« none » :** Defines a group of information, not delimited.
82 * **« variable » :**Data delimited by one or more characters. The "end" attribute is mandatory for this format.
83 * **« fixed » :**Fixed size data. The « length » attribute is mandatory.
84 )))
85 |(((
86 **end**
87
88 //string//
89 )))|(((
90 **Default Value : **empty
91
92 **Description :** Defines the character or characters delimiting a " variable " format. The characters " \r " (carriage return) " \n " (newline) " \t " (tab), can be used.
93 )))
94 |(((
95 **length**
96
97 //integer//
98 )))|(((
99 **Default Value : **empty
100
101 **Description :** Defines the number of characters to be taken for a structure of type "fixed".
102 )))
103 |(((
104 **min**
105
106 //integer//
107 )))|(((
108 **Default Value : **0
109
110 **Description : **Defines the minimum number of successive occurrences of this tag.
111 )))
112 |(((
113 **max**
114
115 //integer//
116 )))|(((
117 **Default Value : **1
118
119 **Description : **Defines the maximum number of successive occurrences of this tag. The character "n" can be used to indicate an infinite number.
120 )))
121 |(((
122 **doRead**
123
124 //boolean//
125 )))|(((
126 **Default Value : **true
127
128 **Description : **Used for reading only. Defines whether the XML tag should be written to the output XML file. Not writing a tag frees up memory and speeds up processing. It becomes essential to use this attribute to process files of several hundred Mo.
129 )))
130 |(((
131 **skipEmpty**
132
133 //boolean//
134 )))|(((
135 **Default Value : **true
136
137 **Description : **Used for reading only. Defines if an empty XML tag should be generated if the data is empty in the source file.
138 )))
139 |(((
140 **errorLevel**
141
142 //boolean//
143 )))|(((
144 **Default Value : **false
145
146 **Description : **When this attribute is set to "true", the translator will make a copy of the reading point. In case of error, the first characters will be returned in the error message. It is advisable to set this attribute to " true " on the records or segments.
147 )))
148 |(((
149 **key**
150
151 //boolean//
152 )))|(((
153 **Default Value : **false
154
155 **Description : **Defines if the data is a key for its parent. The data read must be identical to the value inside the tag described in the format.
156 )))
157 |(((
158 **dataPick**
159
160 //boolean//
161 )))|(((
162 **Default Value : **true
163
164 **Description : **For the "fixed" format only. It defines if the data is really taken.
165 )))
166 |(((
167 **emptyEnd**
168
169 //boolean//
170 )))|(((
171 **Default Value : **false (if the tag has children) - true (if the tag has no children)
172
173 **Description : **Defines whether the end separator, for a "variable" format, should be written if the data is empty.
174 )))
175 |(((
176 **lastEnd**
177
178 //boolean//
179 )))|(((
180 **Default Value : **true
181
182 **Description : **Defines whether the end separator, for a "variable" format, should be written if the data is the last in a sequence.
183 )))
184 |(((
185 **optionChar**
186
187 //string//
188 )))|(((
189 **Default Value** : empty
190
191 **Description : **Pour un format fixe, défini un ou plusieurs caractères qui seront prélevées au-delà de la taille initialement prévue. Cet attribut est particulièrement utile pour gérer des sauts de ligne optionnelle (cas de l’UNA dans un message EDIFACT).
192 )))
193
194
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian