libxml-valid.html revision 2ad1dfffa032025ec70de5b4af878e9b092c79f3
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>valid</title><meta name="generator" content="DocBook XSL Stylesheets V1.48"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css"> 2 .synopsis, .classsynopsis { 3 background: #eeeeee; 4 border: solid 1px #aaaaaa; 5 padding: 0.5em; 6 } 7 .programlisting { 8 background: #eeeeff; 9 border: solid 1px #aaaaff; 10 padding: 0.5em; 11 } 12 .variablelist { 13 padding: 4px; 14 margin-left: 3em; 15 } 16 .navigation { 17 background: #ffeeee; 18 border: solid 1px #ffaaaa; 19 margin-top: 0.5em; 20 margin-bottom: 0.5em; 21 } 22 .navigation a { 23 color: #770000; 24 } 25 .navigation a:visited { 26 color: #550000; 27 } 28 .navigation .title { 29 font-size: 200%; 30 } 31 </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual "><link rel="up" href="ch01.html" title="Libxml Programming Notes"><link rel="previous" href="libxml-HTMLparser.html" title="HTMLparser"><link rel="next" href="libxml-catalog.html" title="catalog"></head><body 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="libxml-HTMLparser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="ch01.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><th width="100%" align="center">Gnome XML Library Reference Manual </th><td><a accesskey="n" href="libxml-catalog.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry"><a name="libxml-valid"></a><div class="titlepage"></div><div class="refnamediv"><h2>valid</h2><p>valid — </p></div><div class="refsynopsisdiv"><h2><h1 class="title"><a name="id2639435"></a>Synopsis</h1></h2><pre class="synopsis"> 32 33 34 35struct <a href="libxml-valid.html#xmlValidState">xmlValidState</a>; 36typedef <a href="libxml-valid.html#xmlValidStatePtr">xmlValidStatePtr</a>; 37void (<a href="libxml-valid.html#xmlValidityErrorFunc">*xmlValidityErrorFunc</a>) (void *ctx, 38 const char *msg, 39 ...); 40void (<a href="libxml-valid.html#xmlValidityWarningFunc">*xmlValidityWarningFunc</a>) (void *ctx, 41 const char *msg, 42 ...); 43struct <a href="libxml-valid.html#xmlValidCtxt">xmlValidCtxt</a>; 44typedef <a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a>; 45typedef <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a>; 46typedef <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a>; 47typedef <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a>; 48typedef <a href="libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a>; 49typedef <a href="libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a>; 50</pre></div><div class="refsect1"><h2>Description</h2><p> 51 52</p></div><div class="refsect1"><h2>Details</h2><div class="refsect2"><h3><a name="xmlValidState"></a>struct xmlValidState</h3><pre class="programlisting">struct xmlValidState;</pre><p> 53 54</p></div><hr><div class="refsect2"><h3><a name="xmlValidStatePtr"></a>xmlValidStatePtr</h3><pre class="programlisting">typedef xmlValidState *xmlValidStatePtr; 55</pre><p> 56 57</p></div><hr><div class="refsect2"><h3><a name="xmlValidityErrorFunc"></a>xmlValidityErrorFunc ()</h3><pre class="programlisting">void (*xmlValidityErrorFunc) (void *ctx, 58 const char *msg, 59 ...);</pre><p> 60Callback called when a validity error is found. This is a message 61oriented function similar to an *printf function.</p><p> 62 63</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td> an xmlValidCtxtPtr validity error context 64</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td> the string to format *printf like vararg 65</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td> remaining arguments to the format 66</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlValidityWarningFunc"></a>xmlValidityWarningFunc ()</h3><pre class="programlisting">void (*xmlValidityWarningFunc) (void *ctx, 67 const char *msg, 68 ...);</pre><p> 69Callback called when a validity warning is found. This is a message 70oriented function similar to an *printf function.</p><p> 71 72</p><div class="variablelist"><table border="0"><col align="left"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td> an xmlValidCtxtPtr validity error context 73</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td> the string to format *printf like vararg 74</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td> remaining arguments to the format 75</td></tr></tbody></table></div></div><hr><div class="refsect2"><h3><a name="xmlValidCtxt"></a>struct xmlValidCtxt</h3><pre class="programlisting">struct xmlValidCtxt { 76 77 void *userData; /* user specific data block */ 78 xmlValidityErrorFunc error; /* the callback in case of errors */ 79 xmlValidityWarningFunc warning; /* the callback in case of warning */ 80 81 /* Node analysis stack used when validating within entities */ 82 xmlNodePtr node; /* Current parsed Node */ 83 int nodeNr; /* Depth of the parsing stack */ 84 int nodeMax; /* Max depth of the parsing stack */ 85 xmlNodePtr *nodeTab; /* array of nodes */ 86 87 int finishDtd; /* finished validating the Dtd ? */ 88 xmlDocPtr doc; /* the document */ 89 int valid; /* temporary validity check result */ 90 91 /* state state used for non-determinist content validation */ 92 xmlValidState *vstate; /* current state */ 93 int vstateNr; /* Depth of the validation stack */ 94 int vstateMax; /* Max depth of the validation stack */ 95 xmlValidState *vstateTab; /* array of validation states */ 96 97#ifdef LIBXML_REGEXP_ENABLED 98 xmlAutomataPtr am; /* the automata */ 99 xmlAutomataStatePtr state; /* used to build the automata */ 100#else 101 void *am; 102 void *state; 103#endif 104}; 105</pre><p> 106</p><p> 107 108</p></div><hr><div class="refsect2"><h3><a name="xmlValidCtxtPtr"></a>xmlValidCtxtPtr</h3><pre class="programlisting">typedef xmlValidCtxt *xmlValidCtxtPtr; 109</pre><p> 110 111</p></div><hr><div class="refsect2"><h3><a name="xmlNotationTablePtr"></a>xmlNotationTablePtr</h3><pre class="programlisting">typedef xmlNotationTable *xmlNotationTablePtr; 112</pre><p> 113 114</p></div><hr><div class="refsect2"><h3><a name="xmlElementTablePtr"></a>xmlElementTablePtr</h3><pre class="programlisting">typedef xmlElementTable *xmlElementTablePtr; 115</pre><p> 116 117</p></div><hr><div class="refsect2"><h3><a name="xmlAttributeTablePtr"></a>xmlAttributeTablePtr</h3><pre class="programlisting">typedef xmlAttributeTable *xmlAttributeTablePtr; 118</pre><p> 119 120</p></div><hr><div class="refsect2"><h3><a name="xmlIDTablePtr"></a>xmlIDTablePtr</h3><pre class="programlisting">typedef xmlIDTable *xmlIDTablePtr; 121</pre><p> 122 123</p></div><hr><div class="refsect2"><h3><a name="xmlRefTablePtr"></a>xmlRefTablePtr</h3><pre class="programlisting">typedef xmlRefTable *xmlRefTablePtr; 124</pre><p> 125 126</p></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-HTMLparser.html"><b><<�HTMLparser</b></a></td><td align="right"><a accesskey="n" href="libxml-catalog.html"><b>catalog�>></b></a></td></tr></table></body></html> 127