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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>xmlautomata: API to build regexp automata</title>
<meta name="generator" content="Libxml2 devhelp stylesheet">
<link rel="start" href="index.html" title="libxml2 Reference Manual">
<link rel="up" href="general.html" title="API">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="general.html" title="API">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="libxml2-xmlIO.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<td><a accesskey="n" href="libxml2-xmlerror.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr></table>
<h2><span class="refentrytitle">xmlautomata</span></h2>
<p>xmlautomata - API to build regexp automata</p>
<p>the API to build regexp automata </p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">typedef struct _xmlAutomata <a href="#xmlAutomata">xmlAutomata</a>;
typedef <a href="libxml2-xmlautomata.html#xmlAutomata">xmlAutomata</a> * <a href="#xmlAutomataPtr">xmlAutomataPtr</a>;
typedef struct _xmlAutomataState <a href="#xmlAutomataState">xmlAutomataState</a>;
typedef <a href="libxml2-xmlautomata.html#xmlAutomataState">xmlAutomataState</a> * <a href="#xmlAutomataStatePtr">xmlAutomataStatePtr</a>;
<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> <a href="#xmlAutomataCompile">xmlAutomataCompile</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataGetInitState">xmlAutomataGetInitState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
int <a href="#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> int lax);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> int min, <br> int max, <br> void * data);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> int min, <br> int max, <br> void * data);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> int counter);
int <a href="#xmlAutomataNewCounter">xmlAutomataNewCounter</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> int min, <br> int max);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> int counter);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> void * data);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> int min, <br> int max, <br> void * data);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> int min, <br> int max, <br> void * data);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewState">xmlAutomataNewState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewTransition">xmlAutomataNewTransition</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> void * data);
<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> void * data);
int <a href="#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state);
void <a href="#xmlFreeAutomata">xmlFreeAutomata</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> <a href="#xmlNewAutomata">xmlNewAutomata</a> (void);
</pre>
</div>
<div class="refsect1" lang="en"><h2>Description</h2></div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomata">Structure </a>xmlAutomata</h3>
<pre class="programlisting">struct _xmlAutomata {
The content of this structure is not made public by the API.
} xmlAutomata;
</pre>
<p></p>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataPtr">Typedef </a>xmlAutomataPtr</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomata">xmlAutomata</a> * xmlAutomataPtr;
</pre>
<p>A libxml automata description, It can be compiled into a regexp</p>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataState">Structure </a>xmlAutomataState</h3>
<pre class="programlisting">struct _xmlAutomataState {
The content of this structure is not made public by the API.
} xmlAutomataState;
</pre>
<p></p>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataStatePtr">Typedef </a>xmlAutomataStatePtr</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataState">xmlAutomataState</a> * xmlAutomataStatePtr;
</pre>
<p>A state int the automata description,</p>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataCompile"></a>xmlAutomataCompile ()</h3>
<pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> xmlAutomataCompile (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br>
</pre>
<p>Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the compiled regexp or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataGetInitState"></a>xmlAutomataGetInitState ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataGetInitState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br>
</pre>
<p>Initial state lookup</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the initial state of the automata</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataIsDeterminist"></a>xmlAutomataIsDeterminist ()</h3>
<pre class="programlisting">int xmlAutomataIsDeterminist (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br>
</pre>
<p>Checks if an automata is determinist.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>1 if true, 0 if not, and -1 in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewAllTrans"></a>xmlAutomataNewAllTrans ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewAllTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> int lax)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a an ALL transition from the @from state to the target state. That transition is an epsilon transition allowed only when all transitions from the @from node have been activated.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>lax</tt></i>:</span></td>
<td>allow to transition if not all all transitions have been activated</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewCountTrans"></a>xmlAutomataNewCountTrans ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> int min, <br> int max, <br> void * data)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>token</tt></i>:</span></td>
<td>the input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>min</tt></i>:</span></td>
<td>the minimum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>max</tt></i>:</span></td>
<td>the maximum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>data</tt></i>:</span></td>
<td>data associated to the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewCountTrans2"></a>xmlAutomataNewCountTrans2 ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountTrans2 (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> int min, <br> int max, <br> void * data)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>token</tt></i>:</span></td>
<td>the input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>token2</tt></i>:</span></td>
<td>the second input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>min</tt></i>:</span></td>
<td>the minimum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>max</tt></i>:</span></td>
<td>the maximum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>data</tt></i>:</span></td>
<td>data associated to the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewCountedTrans"></a>xmlAutomataNewCountedTrans ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountedTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> int counter)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will increment the counter provided</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>counter</tt></i>:</span></td>
<td>the counter associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewCounter"></a>xmlAutomataNewCounter ()</h3>
<pre class="programlisting">int xmlAutomataNewCounter (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> int min, <br> int max)<br>
</pre>
<p>Create a new counter</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>min</tt></i>:</span></td>
<td>the minimal value on the counter</td>
</tr>
<tr>
<td><span class="term"><i><tt>max</tt></i>:</span></td>
<td>the maximal value on the counter</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the counter number or -1 in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewCounterTrans"></a>xmlAutomataNewCounterTrans ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCounterTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> int counter)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will be allowed only if the counter is within the right range.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>counter</tt></i>:</span></td>
<td>the counter associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewEpsilon"></a>xmlAutomataNewEpsilon ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewEpsilon (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewNegTrans"></a>xmlAutomataNewNegTrans ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewNegTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> void * data)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by any value except (@token,@token2) Note that if @token2 is not NULL, then (X, NULL) won't match to follow # the semantic of XSD ##other</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>token</tt></i>:</span></td>
<td>the first input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>token2</tt></i>:</span></td>
<td>the second input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>data</tt></i>:</span></td>
<td>data passed to the callback function if the transition is activated</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewOnceTrans"></a>xmlAutomataNewOnceTrans ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewOnceTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> int min, <br> int max, <br> void * data)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max, moreover that transition can only be crossed once.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>token</tt></i>:</span></td>
<td>the input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>min</tt></i>:</span></td>
<td>the minimum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>max</tt></i>:</span></td>
<td>the maximum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>data</tt></i>:</span></td>
<td>data associated to the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewOnceTrans2"></a>xmlAutomataNewOnceTrans2 ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewOnceTrans2 (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> int min, <br> int max, <br> void * data)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max, moreover that transition can only be crossed once.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>token</tt></i>:</span></td>
<td>the input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>token2</tt></i>:</span></td>
<td>the second input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>min</tt></i>:</span></td>
<td>the minimum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>max</tt></i>:</span></td>
<td>the maximum successive occurrences of token</td>
</tr>
<tr>
<td><span class="term"><i><tt>data</tt></i>:</span></td>
<td>data associated to the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewState"></a>xmlAutomataNewState ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br>
</pre>
<p>Create a new disconnected state in the automata</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the new state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewTransition"></a>xmlAutomataNewTransition ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewTransition (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> void * data)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>token</tt></i>:</span></td>
<td>the input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>data</tt></i>:</span></td>
<td>data passed to the callback function if the transition is activated</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataNewTransition2"></a>xmlAutomataNewTransition2 ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewTransition2 (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br> void * data)<br>
</pre>
<p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>from</tt></i>:</span></td>
<td>the starting point of the transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>to</tt></i>:</span></td>
<td>the target point of the transition or NULL</td>
</tr>
<tr>
<td><span class="term"><i><tt>token</tt></i>:</span></td>
<td>the first input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>token2</tt></i>:</span></td>
<td>the second input string associated to that transition</td>
</tr>
<tr>
<td><span class="term"><i><tt>data</tt></i>:</span></td>
<td>data passed to the callback function if the transition is activated</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the target state or NULL in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlAutomataSetFinalState"></a>xmlAutomataSetFinalState ()</h3>
<pre class="programlisting">int xmlAutomataSetFinalState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state)<br>
</pre>
<p>Makes that state a final state</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>state</tt></i>:</span></td>
<td>a state in this automata</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>0 or -1 in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlFreeAutomata"></a>xmlFreeAutomata ()</h3>
<pre class="programlisting">void xmlFreeAutomata (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br>
</pre>
<p>Free an automata</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody><tr>
<td><span class="term"><i><tt>am</tt></i>:</span></td>
<td>an automata</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlNewAutomata"></a>xmlNewAutomata ()</h3>
<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> xmlNewAutomata (void)<br>
</pre>
<p>Create a new automata</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody><tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the new object or NULL in case of failure</td>
</tr></tbody>
</table></div>
</div>
<hr>
</div>
</div>
</body>
</html>
|