Hide last authors
Outhman Moustaghfir 5.1 1 = SplitFile Connector Documentation =
2
3 == Overview ==
4
5 [[image:1723111201862-594.png]]
6
Outhman Moustaghfir 6.2 7 The splitFile connector is a utility designed to split files based on specific configurations defined in an XML format. The connector supports two modes of operation: **line** and **message **mode. Below is the functional documentation for each mode, including the expected format file, sample input file, and corresponding output files.
Outhman Moustaghfir 5.1 8
9 == Usage ==
10
11 == Xml Format ==
12
13
14 {{{
15 }}}
16
17 {{code language="XML"}}
18
19 <ixDOC xmlns:ixf="http://www.ixPath.com/Function"
20 xmlns:xs="http://www.w3.org/2001/XMLSchema"
21 xmlns:ix="localFunction"
22 xmlns:fn="http://www.w3.org/2005/xpath-functions">
23
Outhman Moustaghfir 6.4 24 <Split400 mode="" headers="" footers="" excluded="" included="" endLine="" position ="" size="" optionChar="" ></Split400>
Outhman Moustaghfir 5.1 25 </ixDOC>
26
27 {{/code}}
28
29
30
31
32 === Key Attributes: ===
33
34 * **Headers and Footers:** Specify header and footer lines to be included in each output file.
Outhman Moustaghfir 6.4 35 * **endLine:** Define the character used to separate lines in the file, default value is newLine char.
36 * **included : :** Include specific lines from the output by defining them in the include attribute.
37 * **excluded:** Exclude specific lines from the output by defining them in the exclude attribute.
38 * **Position and Size:** Used to locate and define the include in the input file.
Outhman Moustaghfir 5.1 39
40 === 1. Mode: per_identifier ===
41
42
Outhman Moustaghfir 6.1 43 === Input File Example : ===
Outhman Moustaghfir 5.1 44
45
46 {{code language="txt"}}
47 UNA +.? '
48 UNB+UNOD 3+5907613200009 14+5907808850002 14+240509 1553+11480134402++DESADV'
49 UNH+22865910+DESADV D 96A UN EAN005'
50 BGM+351+5103742405090001+9'
51 DTM+137 20240509 102'
52 DTM+2 20240509 102'
53 DTM+17 20240509 102'
54 RFF+DQ 5103742405090001'
55 DTM+171 20240509 102'
56 RFF+ON 0136811328'
57 NAD+BY+5907808850002 9++CASTORAMA POLSKA SP. Z O.O.+UL. KRAKOWIAKÓW 78+WARSZAWA++02-255+PL'
58 NAD+SU+5907613200009 9++TEMARED SPÓŁKA Z OGRANICZONĄ ODPOWI EDZIALNOŚCIĄ+al. Lotników Polskich 1+Świdnik++21-040+PL'
59 NAD+DP+5908305680970 9++CASTORAMA PIŁA+UL. BYDGOSKA 135+Piła++64-920+PL'
60 NAD+FW+5907613200009 9'
61 CPS+1'
62 LIN+1++5907640254112 EN'
63 PIA+1+S1OVZ.075.201.126.522_M SA'
64 QTY+12 2.00 EA'
65 QTY+52 1 EA'
66 RFF+LI 00001'
67 RFF+ON 0136811328'
68 LIN+2++5907640254150 EN'
69 PIA+1+S1OVZ.075.201.106.511_M SA'
70 QTY+12 2.00 EA'
71 QTY+52 1 EA'
72 RFF+LI 00002'
73 RFF+ON 0136811328'
74 LIN+3++5907640254426 EN'
75 PIA+1+S2OVZ.075.264.126.524_M SA'
76 QTY+12 2.00 EA'
77 QTY+52 1 EA'
78 RFF+LI 00003'
79 RFF+ON 0136811328'
80 LIN+4++5907640254617 EN'
81 PIA+1+S1OVZ.075.230.126.523_M SA'
82 QTY+12 2.00 EA'
83 QTY+52 1 EA'
84 RFF+LI 00004'
85 RFF+ON 0136811328'
86 LIN+5++5907640254624 EN'
87 PIA+1+S1OVZ.075.201.106.511_USNE SA'
88 QTY+12 1.00 EA'
89 QTY+52 1 EA'
90 RFF+LI 00005'
91 RFF+ON 0136811328'
92 CNT+2 5'
93 UNH+22865910+DESADV D 96A UN EAN005'
94 BGM+351+5103742405090001+9'
95 DTM+137 20240509 102'
96 DTM+2 20240509 102'
97 DTM+17 20240509 102'
98 RFF+DQ 5103742405090001'
99 DTM+171 20240509 102'
100 RFF+ON 0136811328
101 NAD+BY+5907808850002 9++CASTORAMA POLSKA SP. Z O.O.+UL. KRAKOWIAKÓW 78+WARSZAWA++02-255+PL'
102 NAD+SU+5907613200009 9++TEMARED SPÓŁKA Z OGRANICZONĄ ODPOWI EDZIALNOŚCIĄ+al. Lotników Polskich 1+Świdnik++21-040+PL'
103 NAD+DP+5908305680970 9++CASTORAMA PIŁA+UL. BYDGOSKA 135+Piła++64-920+PL'
104 NAD+FW+5907613200009 9'
105 CPS+1'
106 LIN+1++5907640254112 EN'
107 PIA+1+S1OVZ.075.201.126.522_M SA'
108 QTY+12 2.00 EA'
109 QTY+52 1 EA'
110 RFF+LI 00001'
111 RFF+ON 0136811328'
112 LIN+2++5907640254150 EN'
113 PIA+1+S1OVZ.075.201.106.511_M SA'
114 QTY+12 2.00 EA'
115 QTY+52 1 EA'
116 RFF+LI 00002'
117 RFF+ON 0136811328'
118 LIN+3++5907640254426 EN'
119 PIA+1+S2OVZ.075.264.126.524_M SA'
120 QTY+12 2.00 EA'
121 QTY+52 1 EA'
122 RFF+LI 00003'
123 RFF+ON 0136811328'
124 LIN+4++5907640254617 EN'
125 PIA+1+S1OVZ.075.230.126.523_M SA'
126 QTY+12 2.00 EA'
127 QTY+52 1 EA'
128 RFF+LI 00004'
129 RFF+ON 0136811328'
130 LIN+5++5907640254624 EN'
131 PIA+1+S1OVZ.075.201.106.511_USNE SA'
132 QTY+12 1.00 EA'
133 QTY+52 1 EA'
134 RFF+LI 00005'
135 RFF+ON 0136811328'
136 CNT+2 5'
137 UNH+22865910+DESADV D 96A UN EAN005'
138 BGM+351+5103742405090001+9'
139 DTM+137 20240509 102'
140 DTM+2 20240509 102'
141 DTM+17 20240509 102'
142 RFF+DQ 5103742405090001'
143 DTM+171 20240509 102'
144 RFF+ON 0136811328'
145 NAD+BY+5907808850002 9++CASTORAMA POLSKA SP. Z O.O.+UL. KRAKOWIAKÓW 78+WARSZAWA++02-255+PL'
146 NAD+SU+5907613200009 9++TEMARED SPÓŁKA Z OGRANICZONĄ ODPOWI EDZIALNOŚCIĄ+al. Lotników Polskich 1+Świdnik++21-040+PL'
147 NAD+DP+5908305680970 9++CASTORAMA PIŁA+UL. BYDGOSKA 135+Piła++64-920+PL'
148 NAD+FW+5907613200009 9'
149 CPS+1'
150 LIN+1++5907640254112 EN'
151 PIA+1+S1OVZ.075.201.126.522_M SA'
152 QTY+12 2.00 EA'
153 QTY+52 1 EA'
154 RFF+LI 00001'
155 RFF+ON 0136811328'
156 LIN+2++5907640254150 EN'
157 PIA+1+S1OVZ.075.201.106.511_M SA'
158 QTY+12 2.00 EA'
159 QTY+52 1 EA'
160 RFF+LI 00002'
161 RFF+ON 0136811328'
162 LIN+3++5907640254426 EN'
163 PIA+1+S2OVZ.075.264.126.524_M SA'
164 QTY+12 2.00 EA'
165 QTY+52 1 EA'
166 RFF+LI 00003'
167 RFF+ON 0136811328'
168 LIN+4++5907640254617 EN'
169 PIA+1+S1OVZ.075.230.126.523_M SA'
170 QTY+12 2.00 EA'
171 QTY+52 1 EA'
172 RFF+LI 00004'
173 RFF+ON 0136811328'
174 LIN+5++5907640254624 EN'
175 PIA+1+S1OVZ.075.201.106.511_USNE SA'
176 QTY+12 1.00 EA'
177 QTY+52 1 EA'
178 RFF+LI 00005'
179 RFF+ON 0136811328'
180 CNT+2 5'
181 UNH+22865910+DESADV D 96A UN EAN005'
182 BGM+351+5103742405090001+9'
183 DTM+137 20240509 102'
184 DTM+2 20240509 102'
185 DTM+17 20240509 102'
186 RFF+DQ 5103742405090001'
187 DTM+171 20240509 102'
188 RFF+ON 0136811328'
189 NAD+BY+5907808850002 9++CASTORAMA POLSKA SP. Z O.O.+UL. KRAKOWIAKÓW 78+WARSZAWA++02-255+PL'
190 NAD+SU+5907613200009 9++TEMARED SPÓŁKA Z OGRANICZONĄ ODPOWI EDZIALNOŚCIĄ+al. Lotników Polskich 1+Świdnik++21-040+PL'
191 NAD+DP+5908305680970 9++CASTORAMA PIŁA+UL. BYDGOSKA 135+Piła++64-920+PL'
192 NAD+FW+5907613200009 9'
193 CPS+1'
194 LIN+1++5907640254112 EN'
195 PIA+1+S1OVZ.075.201.126.522_M SA'
196 QTY+12 2.00 EA'
197 QTY+52 1 EA'
198 RFF+LI 00001'
199 RFF+ON 0136811328'
200 LIN+2++5907640254150 EN'
201 PIA+1+S1OVZ.075.201.106.511_M SA'
202 QTY+12 2.00 EA'
203 QTY+52 1 EA'
204 RFF+LI 00002'
205 RFF+ON 0136811328'
206 LIN+3++5907640254426 EN'
207 PIA+1+S2OVZ.075.264.126.524_M SA'
208 QTY+12 2.00 EA'
209 QTY+52 1 EA'
210 RFF+LI 00003'
211 RFF+ON 0136811328'
212 LIN+4++5907640254617 EN'
213 PIA+1+S1OVZ.075.230.126.523_M SA'
214 QTY+12 2.00 EA'
215 QTY+52 1 EA'
216 RFF+LI 00004'
217 RFF+ON 0136811328'
218 LIN+5++5907640254624 EN'
219 PIA+1+S1OVZ.075.201.106.511_USNE SA'
220 QTY+12 1.00 EA'
221 QTY+52 1 EA'
222 RFF+LI 00005'
223 RFF+ON 0136811328'
224 CNT+2 5'
225 UNH+22865910+DESADV D 96A UN EAN005'
226 BGM+351+5103742405090001+9'
227 DTM+137 20240509 102'
228 DTM+2 20240509 102'
229 DTM+17 20240509 102'
230 RFF+DQ 5103742405090001'
231 DTM+171 20240509 102'
232 RFF+ON 0136811328'
233 NAD+BY+5907808850002 9++CASTORAMA POLSKA SP. Z O.O.+UL. KRAKOWIAKÓW 78+WARSZAWA++02-255+PL'
234 NAD+SU+5907613200009 9++TEMARED SPÓŁKA Z OGRANICZONĄ ODPOWI EDZIALNOŚCIĄ+al. Lotników Polskich 1+Świdnik++21-040+PL'
235 NAD+DP+5908305680970 9++CASTORAMA PIŁA+UL. BYDGOSKA 135+Piła++64-920+PL'
236 NAD+FW+5907613200009 9'
237 CPS+1'
238 LIN+1++5907640254112 EN'
239 PIA+1+S1OVZ.075.201.126.522_M SA'
240 QTY+12 2.00 EA'
241 QTY+52 1 EA'
242 RFF+LI 00001'
243 RFF+ON 0136811328'
244 LIN+2++5907640254150 EN'
245 PIA+1+S1OVZ.075.201.106.511_M SA'
246 QTY+12 2.00 EA'
247 QTY+52 1 EA'
248 RFF+LI 00002'
249 RFF+ON 0136811328'
250 LIN+3++5907640254426 EN'
251 PIA+1+S2OVZ.075.264.126.524_M SA'
252 QTY+12 2.00 EA'
253 QTY+52 1 EA'
254 RFF+LI 00003'
255 RFF+ON 0136811328'
256 LIN+4++5907640254617 EN'
257 PIA+1+S1OVZ.075.230.126.523_M SA'
258 QTY+12 2.00 EA'
259 QTY+52 1 EA'
260 RFF+LI 00004'
261 RFF+ON 0136811328'
262 LIN+5++5907640254624 EN'
263 PIA+1+S1OVZ.075.201.106.511_USNE SA'
264 QTY+12 1.00 EA'
265 QTY+52 1 EA'
266 RFF+LI 00005'
267 RFF+ON 0136811328'
268 CNT+2 5'
269 UNZ+1+11480134402'
270 UNZ1'
271 '
272 {{/code}}
273
274
Outhman Moustaghfir 6.1 275 ==== Example 1: without specifying identifiers ====
Outhman Moustaghfir 5.1 276
277 when we don't use identifiers . it means for each output file we are going to have headers and footers and also for the identifiers we will defined them by position and size so for each line at a specific position and with a size this is the identifier .
278
279 {{{
280 }}}
281
282 {{code language="XML"}}
283
284 <ixDOC xmlns:ixf="http://www.ixPath.com/Function"
285 xmlns:xs="http://www.w3.org/2001/XMLSchema"
286 xmlns:ix="localFunction"
287 xmlns:fn="http://www.w3.org/2005/xpath-functions">
288
Outhman Moustaghfir 6.1 289 <Split400 mode="per_identifier" headers="UNA;UNB" footers="UNZ1;UNZ" ignoreItems="QTY" identifiers="" lineseparator="'" position ="25" size="9"></Split400>
Outhman Moustaghfir 5.1 290 </ixDOC>
291
292 {{/code}}
293
Outhman Moustaghfir 6.1 294 == output files : ==
Outhman Moustaghfir 5.1 295
296 [[image:1723112876572-265.png]]
297
298
299 fileName_1_ //**UN EAN00**//.txt
300
301
302 {{code language="txt"}}
303 UNA +.? '
304 UNB+UNOD 3+5907613200009 14+5907808850002 14+240509 1553+11480134402++DESADV'
305 UNH+22865910+DESADV D 96A UN EAN005'
306 UNH+22865910+DESADV D 96A UN EAN005'
307 UNH+22865910+DESADV D 96A UN EAN005'
308 UNH+22865910+DESADV D 96A UN EAN005'
309 UNH+22865910+DESADV D 96A UN EAN005'
310 UNZ+1+11480134402'
311 UNZ1'
312
313 {{/code}}
314
315 == Example 2: with specifiying identifiers ==
316
317 we don't need to use position and size.
318
319 == 2. Mode: per_bloc: ==
320
321 In **per_bloc** mode, the file is split into sections based on a specified identifier. Each output file begins with the start of an identifier and ends when another identifier is encountered.
322
323
324 ==== Example ====
325
326
327 {{code language="xml"}}
328
329 <ixDOC xmlns:ixf="http://www.ixPath.com/Function"
330 xmlns:xs="http://www.w3.org/2001/XMLSchema"
331 xmlns:ix="localFunction"
332 xmlns:fn="http://www.w3.org/2005/xpath-functions">
333
Outhman Moustaghfir 6.1 334 <Split400 mode="Per_bloc" headers="UNA;UNB" footers="UNZ1;UNZ" ignoreItems="QTY" identifiers="UNH" lineseparator="'"></Split400>
Outhman Moustaghfir 5.1 335 </ixDOC>
336
337 {{/code}}
338
339 === an example of an output file ===
340
341 {{code language="xml"}}
342 UNA +.? '
343 UNB+UNOD 3+5907613200009 14+5907808850002 14+240509 1553+11480134402++DESADV'
344 UNH+22865910+DESADV D 96A UN EAN005'
345 BGM+351+5103742405090001+9'
346 DTM+137 20240509 102'
347 DTM+2 20240509 102'
348 DTM+17 20240509 102'
349 RFF+DQ 5103742405090001'
350 DTM+171 20240509 102'
351 RFF+ON 0136811328'
352 NAD+BY+5907808850002 9++CASTORAMA POLSKA SP. Z O.O.+UL. KRAKOWIAKÓW 78+WARSZAWA++02-255+PL'
353 NAD+SU+5907613200009 9++TEMARED SPÓŁKA Z OGRANICZONĄ ODPOWI EDZIALNOŚCIĄ+al. Lotników Polskich 1+Świdnik++21-040+PL'
354 NAD+DP+5908305680970 9++CASTORAMA PIŁA+UL. BYDGOSKA 135+Piła++64-920+PL'
355 NAD+FW+5907613200009 9'
356 CPS+1'
357 LIN+1++5907640254112 EN'
358 PIA+1+S1OVZ.075.201.126.522_M SA'
359 RFF+LI 00001'
360 RFF+ON 0136811328'
361 LIN+2++5907640254150 EN'
362 PIA+1+S1OVZ.075.201.106.511_M SA'
363 RFF+LI 00002'
364 RFF+ON 0136811328'
365 LIN+3++5907640254426 EN'
366 PIA+1+S2OVZ.075.264.126.524_M SA'
367 RFF+LI 00003'
368 RFF+ON 0136811328'
369 LIN+4++5907640254617 EN'
370 PIA+1+S1OVZ.075.230.126.523_M SA'
371 RFF+LI 00004'
372 RFF+ON 0136811328'
373 LIN+5++5907640254624 EN'
374 PIA+1+S1OVZ.075.201.106.511_USNE SA'
375 RFF+LI 00005'
376 RFF+ON 0136811328'
377 CNT+2 5'
378 UNZ+1+11480134402'
379 UNZ1'
380
381 {{/code}}
382
Outhman Moustaghfir 6.1 383 === ===
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian