int <ahref="#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a> (<ahref="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> const <ahref="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len);
int <ahref="#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a> (<ahref="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> int flags);
</pre><p>DEPRECATED: This function will be made private. Call <ahref="libxml2-parser.html#xmlCleanupParser">xmlCleanupParser</a> to free global state but see the warnings there. <ahref="libxml2-parser.html#xmlCleanupParser">xmlCleanupParser</a> should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Cleanup the default Schemas type library associated to RelaxNG</p>
</pre><p>Get the callback information used to handle errors for a validation context</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><spanclass="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><spanclass="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><spanclass="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><spanclass="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><spanclass="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><spanclass="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
</pre><p>Create an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="xmlRelaxNGNewMemParserCtxt"/>xmlRelaxNGNewMemParserCtxt ()</h3><preclass="programlisting"><ahref="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewMemParserCtxt (const char * buffer, <br/> int size)<br/>
</pre><p>Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
</pre><p>Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
</pre><p>Create an XML RelaxNGs validation context based on the given schema</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML RelaxNGs</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML RelaxNG structure built from the resource or NULL in case of error</td></tr></tbody></table></div></div>
</pre><p>Set the callback functions used to handle errors for a validation context</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><spanclass="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><spanclass="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><spanclass="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div>
</pre><p>Set the callback functions used to handle errors for a parsing context</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><spanclass="term"><i><tt>serror</tt></i>:</span></td><td>the error callback</td></tr><tr><td><spanclass="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><spanclass="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
</pre><p>Validate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><spanclass="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><spanclass="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 in case of error.</td></tr></tbody></table></div></div>
</pre><p>Pop the element end from the RelaxNG validation stack.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><spanclass="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><spanclass="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><spanclass="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><spanclass="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 otherwise</td></tr></tbody></table></div></div>
</pre><p>Push a new element start on the RelaxNG validation stack.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><spanclass="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><spanclass="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 if validating the element requires a full node, and -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="xmlRelaxParserSetFlag"/>xmlRelaxParserSetFlag ()</h3><preclass="programlisting">int xmlRelaxParserSetFlag (<ahref="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> int flags)<br/>
</pre><p>Semi private function used to pass information to a parser context which are a combination of <ahref="libxml2-relaxng.html#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a> .</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>a RelaxNG parser context</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>a set of flags values</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success and -1 in case of error</td></tr></tbody></table></div></div>