1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>xmlautomata: API to build regexp automata</title> 5<meta name="generator" content="Libxml2 devhelp stylesheet"> 6<link rel="start" href="index.html" title="libxml2 Reference Manual"> 7<link rel="up" href="general.html" title="API"> 8<link rel="stylesheet" href="style.css" type="text/css"> 9<link rel="chapter" href="general.html" title="API"> 10</head> 11<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 12<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> 13<td><a accesskey="p" href="libxml2-xmlIO.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> 14<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> 15<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> 16<td><a accesskey="n" href="libxml2-xmlerror.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> 17<th width="100%" align="center">libxml2 Reference Manual</th> 18</tr></table> 19<h2><span class="refentrytitle">xmlautomata</span></h2> 20<p>xmlautomata - API to build regexp automata</p> 21<p>the API to build regexp automata </p> 22<p>Author(s): Daniel Veillard </p> 23<div class="refsynopsisdiv"> 24<h2>Synopsis</h2> 25<pre class="synopsis">typedef struct _xmlAutomata <a href="#xmlAutomata">xmlAutomata</a>; 26typedef <a href="libxml2-xmlautomata.html#xmlAutomata">xmlAutomata</a> * <a href="#xmlAutomataPtr">xmlAutomataPtr</a>; 27typedef struct _xmlAutomataState <a href="#xmlAutomataState">xmlAutomataState</a>; 28typedef <a href="libxml2-xmlautomata.html#xmlAutomataState">xmlAutomataState</a> * <a href="#xmlAutomataStatePtr">xmlAutomataStatePtr</a>; 29<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> <a href="#xmlAutomataCompile">xmlAutomataCompile</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am); 30<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataGetInitState">xmlAutomataGetInitState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am); 31int <a href="#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am); 32<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); 33<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); 34<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); 35<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); 36int <a href="#xmlAutomataNewCounter">xmlAutomataNewCounter</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> int min, <br> int max); 37<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); 38<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); 39<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); 40<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); 41<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); 42<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewState">xmlAutomataNewState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am); 43<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); 44<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); 45int <a href="#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state); 46void <a href="#xmlFreeAutomata">xmlFreeAutomata</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am); 47<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> <a href="#xmlNewAutomata">xmlNewAutomata</a> (void); 48</pre> 49</div> 50<div class="refsect1" lang="en"><h2>Description</h2></div> 51<div class="refsect1" lang="en"> 52<h2>Details</h2> 53<div class="refsect2" lang="en"> 54<div class="refsect2" lang="en"> 55<h3> 56<a name="xmlAutomata">Structure </a>xmlAutomata</h3> 57<pre class="programlisting">struct _xmlAutomata { 58The content of this structure is not made public by the API. 59} xmlAutomata; 60</pre> 61<p></p> 62</div> 63<hr> 64<div class="refsect2" lang="en"> 65<h3> 66<a name="xmlAutomataPtr">Typedef </a>xmlAutomataPtr</h3> 67<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomata">xmlAutomata</a> * xmlAutomataPtr; 68</pre> 69<p>A libxml automata description, It can be compiled into a regexp</p> 70</div> 71<hr> 72<div class="refsect2" lang="en"> 73<h3> 74<a name="xmlAutomataState">Structure </a>xmlAutomataState</h3> 75<pre class="programlisting">struct _xmlAutomataState { 76The content of this structure is not made public by the API. 77} xmlAutomataState; 78</pre> 79<p></p> 80</div> 81<hr> 82<div class="refsect2" lang="en"> 83<h3> 84<a name="xmlAutomataStatePtr">Typedef </a>xmlAutomataStatePtr</h3> 85<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataState">xmlAutomataState</a> * xmlAutomataStatePtr; 86</pre> 87<p>A state int the automata description,</p> 88</div> 89<hr> 90<div class="refsect2" lang="en"> 91<h3> 92<a name="xmlAutomataCompile"></a>xmlAutomataCompile ()</h3> 93<pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> xmlAutomataCompile (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br> 94</pre> 95<p>Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.</p> 96<div class="variablelist"><table border="0"> 97<col align="left"> 98<tbody> 99<tr> 100<td><span class="term"><i><tt>am</tt></i>:</span></td> 101<td>an automata</td> 102</tr> 103<tr> 104<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 105<td>the compiled regexp or NULL in case of error</td> 106</tr> 107</tbody> 108</table></div> 109</div> 110<hr> 111<div class="refsect2" lang="en"> 112<h3> 113<a name="xmlAutomataGetInitState"></a>xmlAutomataGetInitState ()</h3> 114<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataGetInitState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br> 115</pre> 116<p>Initial state lookup</p> 117<div class="variablelist"><table border="0"> 118<col align="left"> 119<tbody> 120<tr> 121<td><span class="term"><i><tt>am</tt></i>:</span></td> 122<td>an automata</td> 123</tr> 124<tr> 125<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 126<td>the initial state of the automata</td> 127</tr> 128</tbody> 129</table></div> 130</div> 131<hr> 132<div class="refsect2" lang="en"> 133<h3> 134<a name="xmlAutomataIsDeterminist"></a>xmlAutomataIsDeterminist ()</h3> 135<pre class="programlisting">int xmlAutomataIsDeterminist (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br> 136</pre> 137<p>Checks if an automata is determinist.</p> 138<div class="variablelist"><table border="0"> 139<col align="left"> 140<tbody> 141<tr> 142<td><span class="term"><i><tt>am</tt></i>:</span></td> 143<td>an automata</td> 144</tr> 145<tr> 146<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 147<td>1 if true, 0 if not, and -1 in case of error</td> 148</tr> 149</tbody> 150</table></div> 151</div> 152<hr> 153<div class="refsect2" lang="en"> 154<h3> 155<a name="xmlAutomataNewAllTrans"></a>xmlAutomataNewAllTrans ()</h3> 156<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> 157</pre> 158<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> 159<div class="variablelist"><table border="0"> 160<col align="left"> 161<tbody> 162<tr> 163<td><span class="term"><i><tt>am</tt></i>:</span></td> 164<td>an automata</td> 165</tr> 166<tr> 167<td><span class="term"><i><tt>from</tt></i>:</span></td> 168<td>the starting point of the transition</td> 169</tr> 170<tr> 171<td><span class="term"><i><tt>to</tt></i>:</span></td> 172<td>the target point of the transition or NULL</td> 173</tr> 174<tr> 175<td><span class="term"><i><tt>lax</tt></i>:</span></td> 176<td>allow to transition if not all all transitions have been activated</td> 177</tr> 178<tr> 179<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 180<td>the target state or NULL in case of error</td> 181</tr> 182</tbody> 183</table></div> 184</div> 185<hr> 186<div class="refsect2" lang="en"> 187<h3> 188<a name="xmlAutomataNewCountTrans"></a>xmlAutomataNewCountTrans ()</h3> 189<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> 190</pre> 191<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> 192<div class="variablelist"><table border="0"> 193<col align="left"> 194<tbody> 195<tr> 196<td><span class="term"><i><tt>am</tt></i>:</span></td> 197<td>an automata</td> 198</tr> 199<tr> 200<td><span class="term"><i><tt>from</tt></i>:</span></td> 201<td>the starting point of the transition</td> 202</tr> 203<tr> 204<td><span class="term"><i><tt>to</tt></i>:</span></td> 205<td>the target point of the transition or NULL</td> 206</tr> 207<tr> 208<td><span class="term"><i><tt>token</tt></i>:</span></td> 209<td>the input string associated to that transition</td> 210</tr> 211<tr> 212<td><span class="term"><i><tt>min</tt></i>:</span></td> 213<td>the minimum successive occurrences of token</td> 214</tr> 215<tr> 216<td><span class="term"><i><tt>max</tt></i>:</span></td> 217<td>the maximum successive occurrences of token</td> 218</tr> 219<tr> 220<td><span class="term"><i><tt>data</tt></i>:</span></td> 221<td>data associated to the transition</td> 222</tr> 223<tr> 224<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 225<td>the target state or NULL in case of error</td> 226</tr> 227</tbody> 228</table></div> 229</div> 230<hr> 231<div class="refsect2" lang="en"> 232<h3> 233<a name="xmlAutomataNewCountTrans2"></a>xmlAutomataNewCountTrans2 ()</h3> 234<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> 235</pre> 236<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> 237<div class="variablelist"><table border="0"> 238<col align="left"> 239<tbody> 240<tr> 241<td><span class="term"><i><tt>am</tt></i>:</span></td> 242<td>an automata</td> 243</tr> 244<tr> 245<td><span class="term"><i><tt>from</tt></i>:</span></td> 246<td>the starting point of the transition</td> 247</tr> 248<tr> 249<td><span class="term"><i><tt>to</tt></i>:</span></td> 250<td>the target point of the transition or NULL</td> 251</tr> 252<tr> 253<td><span class="term"><i><tt>token</tt></i>:</span></td> 254<td>the input string associated to that transition</td> 255</tr> 256<tr> 257<td><span class="term"><i><tt>token2</tt></i>:</span></td> 258<td>the second input string associated to that transition</td> 259</tr> 260<tr> 261<td><span class="term"><i><tt>min</tt></i>:</span></td> 262<td>the minimum successive occurrences of token</td> 263</tr> 264<tr> 265<td><span class="term"><i><tt>max</tt></i>:</span></td> 266<td>the maximum successive occurrences of token</td> 267</tr> 268<tr> 269<td><span class="term"><i><tt>data</tt></i>:</span></td> 270<td>data associated to the transition</td> 271</tr> 272<tr> 273<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 274<td>the target state or NULL in case of error</td> 275</tr> 276</tbody> 277</table></div> 278</div> 279<hr> 280<div class="refsect2" lang="en"> 281<h3> 282<a name="xmlAutomataNewCountedTrans"></a>xmlAutomataNewCountedTrans ()</h3> 283<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> 284</pre> 285<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> 286<div class="variablelist"><table border="0"> 287<col align="left"> 288<tbody> 289<tr> 290<td><span class="term"><i><tt>am</tt></i>:</span></td> 291<td>an automata</td> 292</tr> 293<tr> 294<td><span class="term"><i><tt>from</tt></i>:</span></td> 295<td>the starting point of the transition</td> 296</tr> 297<tr> 298<td><span class="term"><i><tt>to</tt></i>:</span></td> 299<td>the target point of the transition or NULL</td> 300</tr> 301<tr> 302<td><span class="term"><i><tt>counter</tt></i>:</span></td> 303<td>the counter associated to that transition</td> 304</tr> 305<tr> 306<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 307<td>the target state or NULL in case of error</td> 308</tr> 309</tbody> 310</table></div> 311</div> 312<hr> 313<div class="refsect2" lang="en"> 314<h3> 315<a name="xmlAutomataNewCounter"></a>xmlAutomataNewCounter ()</h3> 316<pre class="programlisting">int xmlAutomataNewCounter (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br> int min, <br> int max)<br> 317</pre> 318<p>Create a new counter</p> 319<div class="variablelist"><table border="0"> 320<col align="left"> 321<tbody> 322<tr> 323<td><span class="term"><i><tt>am</tt></i>:</span></td> 324<td>an automata</td> 325</tr> 326<tr> 327<td><span class="term"><i><tt>min</tt></i>:</span></td> 328<td>the minimal value on the counter</td> 329</tr> 330<tr> 331<td><span class="term"><i><tt>max</tt></i>:</span></td> 332<td>the maximal value on the counter</td> 333</tr> 334<tr> 335<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 336<td>the counter number or -1 in case of error</td> 337</tr> 338</tbody> 339</table></div> 340</div> 341<hr> 342<div class="refsect2" lang="en"> 343<h3> 344<a name="xmlAutomataNewCounterTrans"></a>xmlAutomataNewCounterTrans ()</h3> 345<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> 346</pre> 347<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> 348<div class="variablelist"><table border="0"> 349<col align="left"> 350<tbody> 351<tr> 352<td><span class="term"><i><tt>am</tt></i>:</span></td> 353<td>an automata</td> 354</tr> 355<tr> 356<td><span class="term"><i><tt>from</tt></i>:</span></td> 357<td>the starting point of the transition</td> 358</tr> 359<tr> 360<td><span class="term"><i><tt>to</tt></i>:</span></td> 361<td>the target point of the transition or NULL</td> 362</tr> 363<tr> 364<td><span class="term"><i><tt>counter</tt></i>:</span></td> 365<td>the counter associated to that transition</td> 366</tr> 367<tr> 368<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 369<td>the target state or NULL in case of error</td> 370</tr> 371</tbody> 372</table></div> 373</div> 374<hr> 375<div class="refsect2" lang="en"> 376<h3> 377<a name="xmlAutomataNewEpsilon"></a>xmlAutomataNewEpsilon ()</h3> 378<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> 379</pre> 380<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> 381<div class="variablelist"><table border="0"> 382<col align="left"> 383<tbody> 384<tr> 385<td><span class="term"><i><tt>am</tt></i>:</span></td> 386<td>an automata</td> 387</tr> 388<tr> 389<td><span class="term"><i><tt>from</tt></i>:</span></td> 390<td>the starting point of the transition</td> 391</tr> 392<tr> 393<td><span class="term"><i><tt>to</tt></i>:</span></td> 394<td>the target point of the transition or NULL</td> 395</tr> 396<tr> 397<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 398<td>the target state or NULL in case of error</td> 399</tr> 400</tbody> 401</table></div> 402</div> 403<hr> 404<div class="refsect2" lang="en"> 405<h3> 406<a name="xmlAutomataNewNegTrans"></a>xmlAutomataNewNegTrans ()</h3> 407<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> 408</pre> 409<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> 410<div class="variablelist"><table border="0"> 411<col align="left"> 412<tbody> 413<tr> 414<td><span class="term"><i><tt>am</tt></i>:</span></td> 415<td>an automata</td> 416</tr> 417<tr> 418<td><span class="term"><i><tt>from</tt></i>:</span></td> 419<td>the starting point of the transition</td> 420</tr> 421<tr> 422<td><span class="term"><i><tt>to</tt></i>:</span></td> 423<td>the target point of the transition or NULL</td> 424</tr> 425<tr> 426<td><span class="term"><i><tt>token</tt></i>:</span></td> 427<td>the first input string associated to that transition</td> 428</tr> 429<tr> 430<td><span class="term"><i><tt>token2</tt></i>:</span></td> 431<td>the second input string associated to that transition</td> 432</tr> 433<tr> 434<td><span class="term"><i><tt>data</tt></i>:</span></td> 435<td>data passed to the callback function if the transition is activated</td> 436</tr> 437<tr> 438<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 439<td>the target state or NULL in case of error</td> 440</tr> 441</tbody> 442</table></div> 443</div> 444<hr> 445<div class="refsect2" lang="en"> 446<h3> 447<a name="xmlAutomataNewOnceTrans"></a>xmlAutomataNewOnceTrans ()</h3> 448<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> 449</pre> 450<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> 451<div class="variablelist"><table border="0"> 452<col align="left"> 453<tbody> 454<tr> 455<td><span class="term"><i><tt>am</tt></i>:</span></td> 456<td>an automata</td> 457</tr> 458<tr> 459<td><span class="term"><i><tt>from</tt></i>:</span></td> 460<td>the starting point of the transition</td> 461</tr> 462<tr> 463<td><span class="term"><i><tt>to</tt></i>:</span></td> 464<td>the target point of the transition or NULL</td> 465</tr> 466<tr> 467<td><span class="term"><i><tt>token</tt></i>:</span></td> 468<td>the input string associated to that transition</td> 469</tr> 470<tr> 471<td><span class="term"><i><tt>min</tt></i>:</span></td> 472<td>the minimum successive occurrences of token</td> 473</tr> 474<tr> 475<td><span class="term"><i><tt>max</tt></i>:</span></td> 476<td>the maximum successive occurrences of token</td> 477</tr> 478<tr> 479<td><span class="term"><i><tt>data</tt></i>:</span></td> 480<td>data associated to the transition</td> 481</tr> 482<tr> 483<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 484<td>the target state or NULL in case of error</td> 485</tr> 486</tbody> 487</table></div> 488</div> 489<hr> 490<div class="refsect2" lang="en"> 491<h3> 492<a name="xmlAutomataNewOnceTrans2"></a>xmlAutomataNewOnceTrans2 ()</h3> 493<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> 494</pre> 495<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> 496<div class="variablelist"><table border="0"> 497<col align="left"> 498<tbody> 499<tr> 500<td><span class="term"><i><tt>am</tt></i>:</span></td> 501<td>an automata</td> 502</tr> 503<tr> 504<td><span class="term"><i><tt>from</tt></i>:</span></td> 505<td>the starting point of the transition</td> 506</tr> 507<tr> 508<td><span class="term"><i><tt>to</tt></i>:</span></td> 509<td>the target point of the transition or NULL</td> 510</tr> 511<tr> 512<td><span class="term"><i><tt>token</tt></i>:</span></td> 513<td>the input string associated to that transition</td> 514</tr> 515<tr> 516<td><span class="term"><i><tt>token2</tt></i>:</span></td> 517<td>the second input string associated to that transition</td> 518</tr> 519<tr> 520<td><span class="term"><i><tt>min</tt></i>:</span></td> 521<td>the minimum successive occurrences of token</td> 522</tr> 523<tr> 524<td><span class="term"><i><tt>max</tt></i>:</span></td> 525<td>the maximum successive occurrences of token</td> 526</tr> 527<tr> 528<td><span class="term"><i><tt>data</tt></i>:</span></td> 529<td>data associated to the transition</td> 530</tr> 531<tr> 532<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 533<td>the target state or NULL in case of error</td> 534</tr> 535</tbody> 536</table></div> 537</div> 538<hr> 539<div class="refsect2" lang="en"> 540<h3> 541<a name="xmlAutomataNewState"></a>xmlAutomataNewState ()</h3> 542<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br> 543</pre> 544<p>Create a new disconnected state in the automata</p> 545<div class="variablelist"><table border="0"> 546<col align="left"> 547<tbody> 548<tr> 549<td><span class="term"><i><tt>am</tt></i>:</span></td> 550<td>an automata</td> 551</tr> 552<tr> 553<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 554<td>the new state or NULL in case of error</td> 555</tr> 556</tbody> 557</table></div> 558</div> 559<hr> 560<div class="refsect2" lang="en"> 561<h3> 562<a name="xmlAutomataNewTransition"></a>xmlAutomataNewTransition ()</h3> 563<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> 564</pre> 565<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> 566<div class="variablelist"><table border="0"> 567<col align="left"> 568<tbody> 569<tr> 570<td><span class="term"><i><tt>am</tt></i>:</span></td> 571<td>an automata</td> 572</tr> 573<tr> 574<td><span class="term"><i><tt>from</tt></i>:</span></td> 575<td>the starting point of the transition</td> 576</tr> 577<tr> 578<td><span class="term"><i><tt>to</tt></i>:</span></td> 579<td>the target point of the transition or NULL</td> 580</tr> 581<tr> 582<td><span class="term"><i><tt>token</tt></i>:</span></td> 583<td>the input string associated to that transition</td> 584</tr> 585<tr> 586<td><span class="term"><i><tt>data</tt></i>:</span></td> 587<td>data passed to the callback function if the transition is activated</td> 588</tr> 589<tr> 590<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 591<td>the target state or NULL in case of error</td> 592</tr> 593</tbody> 594</table></div> 595</div> 596<hr> 597<div class="refsect2" lang="en"> 598<h3> 599<a name="xmlAutomataNewTransition2"></a>xmlAutomataNewTransition2 ()</h3> 600<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> 601</pre> 602<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> 603<div class="variablelist"><table border="0"> 604<col align="left"> 605<tbody> 606<tr> 607<td><span class="term"><i><tt>am</tt></i>:</span></td> 608<td>an automata</td> 609</tr> 610<tr> 611<td><span class="term"><i><tt>from</tt></i>:</span></td> 612<td>the starting point of the transition</td> 613</tr> 614<tr> 615<td><span class="term"><i><tt>to</tt></i>:</span></td> 616<td>the target point of the transition or NULL</td> 617</tr> 618<tr> 619<td><span class="term"><i><tt>token</tt></i>:</span></td> 620<td>the first input string associated to that transition</td> 621</tr> 622<tr> 623<td><span class="term"><i><tt>token2</tt></i>:</span></td> 624<td>the second input string associated to that transition</td> 625</tr> 626<tr> 627<td><span class="term"><i><tt>data</tt></i>:</span></td> 628<td>data passed to the callback function if the transition is activated</td> 629</tr> 630<tr> 631<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 632<td>the target state or NULL in case of error</td> 633</tr> 634</tbody> 635</table></div> 636</div> 637<hr> 638<div class="refsect2" lang="en"> 639<h3> 640<a name="xmlAutomataSetFinalState"></a>xmlAutomataSetFinalState ()</h3> 641<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> 642</pre> 643<p>Makes that state a final state</p> 644<div class="variablelist"><table border="0"> 645<col align="left"> 646<tbody> 647<tr> 648<td><span class="term"><i><tt>am</tt></i>:</span></td> 649<td>an automata</td> 650</tr> 651<tr> 652<td><span class="term"><i><tt>state</tt></i>:</span></td> 653<td>a state in this automata</td> 654</tr> 655<tr> 656<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 657<td>0 or -1 in case of error</td> 658</tr> 659</tbody> 660</table></div> 661</div> 662<hr> 663<div class="refsect2" lang="en"> 664<h3> 665<a name="xmlFreeAutomata"></a>xmlFreeAutomata ()</h3> 666<pre class="programlisting">void xmlFreeAutomata (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br> 667</pre> 668<p>Free an automata</p> 669<div class="variablelist"><table border="0"> 670<col align="left"> 671<tbody><tr> 672<td><span class="term"><i><tt>am</tt></i>:</span></td> 673<td>an automata</td> 674</tr></tbody> 675</table></div> 676</div> 677<hr> 678<div class="refsect2" lang="en"> 679<h3> 680<a name="xmlNewAutomata"></a>xmlNewAutomata ()</h3> 681<pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> xmlNewAutomata (void)<br> 682</pre> 683<p>Create a new automata</p> 684<div class="variablelist"><table border="0"> 685<col align="left"> 686<tbody><tr> 687<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 688<td>the new object or NULL in case of failure</td> 689</tr></tbody> 690</table></div> 691</div> 692<hr> 693</div> 694</div> 695</body> 696</html> 697