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