VirtualBox

source: vbox/trunk/src/libs/libxml2-2.9.4/doc/devhelp/libxml2-relaxng.html@ 71916

Last change on this file since 71916 was 65950, checked in by vboxsync, 8 years ago

libxml 2.9.4: fix export

  • Property svn:eol-style set to native
File size: 34.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5 <title>relaxng: implementation of the Relax-NG validation</title>
6 <meta name="generator" content="Libxml2 devhelp stylesheet"/>
7 <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
8 <link rel="up" href="general.html" title="API"/>
9 <link rel="stylesheet" href="style.css" type="text/css"/>
10 <link rel="chapter" href="general.html" title="API"/>
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
14 <tr valign="middle">
15 <td>
16 <a accesskey="p" href="libxml2-pattern.html">
17 <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
18 </a>
19 </td>
20 <td>
21 <a accesskey="u" href="general.html">
22 <img src="up.png" width="24" height="24" border="0" alt="Up"/>
23 </a>
24 </td>
25 <td>
26 <a accesskey="h" href="index.html">
27 <img src="home.png" width="24" height="24" border="0" alt="Home"/>
28 </a>
29 </td>
30 <td>
31 <a accesskey="n" href="libxml2-schemasInternals.html">
32 <img src="right.png" width="24" height="24" border="0" alt="Next"/>
33 </a>
34 </td>
35 <th width="100%" align="center">libxml2 Reference Manual</th>
36 </tr>
37 </table>
38 <h2>
39 <span class="refentrytitle">relaxng</span>
40 </h2>
41 <p>relaxng - implementation of the Relax-NG validation</p>
42 <p>implementation of the Relax-NG validation </p>
43 <p>Author(s): Daniel Veillard </p>
44 <div class="refsynopsisdiv">
45 <h2>Synopsis</h2>
46 <pre class="synopsis">typedef struct _xmlRelaxNG <a href="#xmlRelaxNG">xmlRelaxNG</a>;
47typedef <a href="libxml2-relaxng.html#xmlRelaxNG">xmlRelaxNG</a> * <a href="#xmlRelaxNGPtr">xmlRelaxNGPtr</a>;
48typedef enum <a href="#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a>;
49typedef struct _xmlRelaxNGParserCtxt <a href="#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a>;
50typedef <a href="libxml2-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a> * <a href="#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a>;
51typedef enum <a href="#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a>;
52typedef struct _xmlRelaxNGValidCtxt <a href="#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a>;
53typedef <a href="libxml2-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a> * <a href="#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a>;
54void <a href="#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt);
55<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
56void <a href="#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx);
57<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a> (const char * URL);
58int <a href="#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx);
59int <a href="#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
60<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> <a href="#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a> (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
61<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a> (const char * buffer, <br/> int size);
62void <a href="#xmlRelaxNGDump">xmlRelaxNGDump</a> (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
63void <a href="#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx);
64<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> <a href="#xmlRelaxNGParse">xmlRelaxNGParse</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);
65void <a href="#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
66int <a href="#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
67typedef void <a href="#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
68int <a href="#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
69void <a href="#xmlRelaxNGFree">xmlRelaxNGFree</a> (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
70int <a href="#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
71void <a href="#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
72void <a href="#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);
73int <a href="#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx);
74int <a href="#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a> (void);
75void <a href="#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a> (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
76void <a href="#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a> (void);
77int <a href="#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len);
78int <a href="#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> int flags);
79typedef void <a href="#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
80</pre>
81 </div>
82 <div class="refsect1" lang="en">
83 <h2>Description</h2>
84 </div>
85 <div class="refsect1" lang="en">
86 <h2>Details</h2>
87 <div class="refsect2" lang="en">
88 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNG">Structure </a>xmlRelaxNG</h3><pre class="programlisting">struct _xmlRelaxNG {
89The content of this structure is not made public by the API.
90} xmlRelaxNG;
91</pre><p/>
92</div>
93 <hr/>
94 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserCtxt">Structure </a>xmlRelaxNGParserCtxt</h3><pre class="programlisting">struct _xmlRelaxNGParserCtxt {
95The content of this structure is not made public by the API.
96} xmlRelaxNGParserCtxt;
97</pre><p/>
98</div>
99 <hr/>
100 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserCtxtPtr">Typedef </a>xmlRelaxNGParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a> * xmlRelaxNGParserCtxtPtr;
101</pre><p/>
102</div>
103 <hr/>
104 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserFlag">Enum </a>xmlRelaxNGParserFlag</h3><pre class="programlisting">enum <a href="#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a> {
105 <a name="XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a> = 0
106 <a name="XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a> = 1
107 <a name="XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a> = 2
108};
109</pre><p/>
110</div>
111 <hr/>
112 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGPtr">Typedef </a>xmlRelaxNGPtr</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNG">xmlRelaxNG</a> * xmlRelaxNGPtr;
113</pre><p/>
114</div>
115 <hr/>
116 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidCtxt">Structure </a>xmlRelaxNGValidCtxt</h3><pre class="programlisting">struct _xmlRelaxNGValidCtxt {
117The content of this structure is not made public by the API.
118} xmlRelaxNGValidCtxt;
119</pre><p/>
120</div>
121 <hr/>
122 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidCtxtPtr">Typedef </a>xmlRelaxNGValidCtxtPtr</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a> * xmlRelaxNGValidCtxtPtr;
123</pre><p/>
124</div>
125 <hr/>
126 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidErr">Enum </a>xmlRelaxNGValidErr</h3><pre class="programlisting">enum <a href="#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a> {
127 <a name="XML_RELAXNG_OK">XML_RELAXNG_OK</a> = 0
128 <a name="XML_RELAXNG_ERR_MEMORY">XML_RELAXNG_ERR_MEMORY</a> = 1
129 <a name="XML_RELAXNG_ERR_TYPE">XML_RELAXNG_ERR_TYPE</a> = 2
130 <a name="XML_RELAXNG_ERR_TYPEVAL">XML_RELAXNG_ERR_TYPEVAL</a> = 3
131 <a name="XML_RELAXNG_ERR_DUPID">XML_RELAXNG_ERR_DUPID</a> = 4
132 <a name="XML_RELAXNG_ERR_TYPECMP">XML_RELAXNG_ERR_TYPECMP</a> = 5
133 <a name="XML_RELAXNG_ERR_NOSTATE">XML_RELAXNG_ERR_NOSTATE</a> = 6
134 <a name="XML_RELAXNG_ERR_NODEFINE">XML_RELAXNG_ERR_NODEFINE</a> = 7
135 <a name="XML_RELAXNG_ERR_LISTEXTRA">XML_RELAXNG_ERR_LISTEXTRA</a> = 8
136 <a name="XML_RELAXNG_ERR_LISTEMPTY">XML_RELAXNG_ERR_LISTEMPTY</a> = 9
137 <a name="XML_RELAXNG_ERR_INTERNODATA">XML_RELAXNG_ERR_INTERNODATA</a> = 10
138 <a name="XML_RELAXNG_ERR_INTERSEQ">XML_RELAXNG_ERR_INTERSEQ</a> = 11
139 <a name="XML_RELAXNG_ERR_INTEREXTRA">XML_RELAXNG_ERR_INTEREXTRA</a> = 12
140 <a name="XML_RELAXNG_ERR_ELEMNAME">XML_RELAXNG_ERR_ELEMNAME</a> = 13
141 <a name="XML_RELAXNG_ERR_ATTRNAME">XML_RELAXNG_ERR_ATTRNAME</a> = 14
142 <a name="XML_RELAXNG_ERR_ELEMNONS">XML_RELAXNG_ERR_ELEMNONS</a> = 15
143 <a name="XML_RELAXNG_ERR_ATTRNONS">XML_RELAXNG_ERR_ATTRNONS</a> = 16
144 <a name="XML_RELAXNG_ERR_ELEMWRONGNS">XML_RELAXNG_ERR_ELEMWRONGNS</a> = 17
145 <a name="XML_RELAXNG_ERR_ATTRWRONGNS">XML_RELAXNG_ERR_ATTRWRONGNS</a> = 18
146 <a name="XML_RELAXNG_ERR_ELEMEXTRANS">XML_RELAXNG_ERR_ELEMEXTRANS</a> = 19
147 <a name="XML_RELAXNG_ERR_ATTREXTRANS">XML_RELAXNG_ERR_ATTREXTRANS</a> = 20
148 <a name="XML_RELAXNG_ERR_ELEMNOTEMPTY">XML_RELAXNG_ERR_ELEMNOTEMPTY</a> = 21
149 <a name="XML_RELAXNG_ERR_NOELEM">XML_RELAXNG_ERR_NOELEM</a> = 22
150 <a name="XML_RELAXNG_ERR_NOTELEM">XML_RELAXNG_ERR_NOTELEM</a> = 23
151 <a name="XML_RELAXNG_ERR_ATTRVALID">XML_RELAXNG_ERR_ATTRVALID</a> = 24
152 <a name="XML_RELAXNG_ERR_CONTENTVALID">XML_RELAXNG_ERR_CONTENTVALID</a> = 25
153 <a name="XML_RELAXNG_ERR_EXTRACONTENT">XML_RELAXNG_ERR_EXTRACONTENT</a> = 26
154 <a name="XML_RELAXNG_ERR_INVALIDATTR">XML_RELAXNG_ERR_INVALIDATTR</a> = 27
155 <a name="XML_RELAXNG_ERR_DATAELEM">XML_RELAXNG_ERR_DATAELEM</a> = 28
156 <a name="XML_RELAXNG_ERR_VALELEM">XML_RELAXNG_ERR_VALELEM</a> = 29
157 <a name="XML_RELAXNG_ERR_LISTELEM">XML_RELAXNG_ERR_LISTELEM</a> = 30
158 <a name="XML_RELAXNG_ERR_DATATYPE">XML_RELAXNG_ERR_DATATYPE</a> = 31
159 <a name="XML_RELAXNG_ERR_VALUE">XML_RELAXNG_ERR_VALUE</a> = 32
160 <a name="XML_RELAXNG_ERR_LIST">XML_RELAXNG_ERR_LIST</a> = 33
161 <a name="XML_RELAXNG_ERR_NOGRAMMAR">XML_RELAXNG_ERR_NOGRAMMAR</a> = 34
162 <a name="XML_RELAXNG_ERR_EXTRADATA">XML_RELAXNG_ERR_EXTRADATA</a> = 35
163 <a name="XML_RELAXNG_ERR_LACKDATA">XML_RELAXNG_ERR_LACKDATA</a> = 36
164 <a name="XML_RELAXNG_ERR_INTERNAL">XML_RELAXNG_ERR_INTERNAL</a> = 37
165 <a name="XML_RELAXNG_ERR_ELEMWRONG">XML_RELAXNG_ERR_ELEMWRONG</a> = 38
166 <a name="XML_RELAXNG_ERR_TEXTWRONG">XML_RELAXNG_ERR_TEXTWRONG</a> = 39
167};
168</pre><p/>
169</div>
170 <hr/>
171 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidityErrorFunc"/>Function type xmlRelaxNGValidityErrorFunc</h3><pre class="programlisting">void xmlRelaxNGValidityErrorFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
172</pre><p>Signature of an error callback from a Relax-NG validation</p>
173<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
174 <hr/>
175 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidityWarningFunc"/>Function type xmlRelaxNGValidityWarningFunc</h3><pre class="programlisting">void xmlRelaxNGValidityWarningFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
176</pre><p>Signature of a warning callback from a Relax-NG validation</p>
177<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
178 <hr/>
179 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGCleanupTypes"/>xmlRelaxNGCleanupTypes ()</h3><pre class="programlisting">void xmlRelaxNGCleanupTypes (void)<br/>
180</pre><p>Cleanup the default Schemas type library associated to RelaxNG</p>
181</div>
182 <hr/>
183 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGDump"/>xmlRelaxNGDump ()</h3><pre class="programlisting">void xmlRelaxNGDump (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
184</pre><p>Dump a RelaxNG structure back</p>
185<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
186 <hr/>
187 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGDumpTree"/>xmlRelaxNGDumpTree ()</h3><pre class="programlisting">void xmlRelaxNGDumpTree (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
188</pre><p>Dump the transformed RelaxNG tree.</p>
189<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
190 <hr/>
191 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFree"/>xmlRelaxNGFree ()</h3><pre class="programlisting">void xmlRelaxNGFree (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
192</pre><p>Deallocate a RelaxNG structure.</p>
193<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
194 <hr/>
195 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFreeParserCtxt"/>xmlRelaxNGFreeParserCtxt ()</h3><pre class="programlisting">void xmlRelaxNGFreeParserCtxt (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br/>
196</pre><p>Free the resources associated to the schema parser context</p>
197<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div></div>
198 <hr/>
199 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFreeValidCtxt"/>xmlRelaxNGFreeValidCtxt ()</h3><pre class="programlisting">void xmlRelaxNGFreeValidCtxt (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt)<br/>
200</pre><p>Free the resources associated to the schema validation context</p>
201<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div></div>
202 <hr/>
203 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGGetParserErrors"/>xmlRelaxNGGetParserErrors ()</h3><pre class="programlisting">int xmlRelaxNGGetParserErrors (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/>
204</pre><p>Get the callback information used to handle errors for a validation context</p>
205<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise.</td></tr></tbody></table></div></div>
206 <hr/>
207 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGGetValidErrors"/>xmlRelaxNGGetValidErrors ()</h3><pre class="programlisting">int xmlRelaxNGGetValidErrors (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/>
208</pre><p>Get the error and warning callback informations</p>
209<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div></div>
210 <hr/>
211 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGInitTypes"/>xmlRelaxNGInitTypes ()</h3><pre class="programlisting">int xmlRelaxNGInitTypes (void)<br/>
212</pre><p>Initilize the default type libraries.</p>
213<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="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>
214 <hr/>
215 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewDocParserCtxt"/>xmlRelaxNGNewDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewDocParserCtxt (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
216</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>
217<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
218 <hr/>
219 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewMemParserCtxt"/>xmlRelaxNGNewMemParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewMemParserCtxt (const char * buffer, <br/> int size)<br/>
220</pre><p>Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.</p>
221<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
222 <hr/>
223 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewParserCtxt"/>xmlRelaxNGNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewParserCtxt (const char * URL)<br/>
224</pre><p>Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file.</p>
225<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
226 <hr/>
227 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewValidCtxt"/>xmlRelaxNGNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> xmlRelaxNGNewValidCtxt (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
228</pre><p>Create an XML RelaxNGs validation context based on the given schema</p>
229<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML RelaxNGs</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div>
230 <hr/>
231 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParse"/>xmlRelaxNGParse ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> xmlRelaxNGParse (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br/>
232</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
233<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="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>
234 <hr/>
235 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetParserErrors"/>xmlRelaxNGSetParserErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetParserErrors (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx)<br/>
236</pre><p>Set the callback functions used to handle errors for a validation context</p>
237<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div>
238 <hr/>
239 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetParserStructuredErrors"/>xmlRelaxNGSetParserStructuredErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetParserStructuredErrors (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/>
240</pre><p>Set the callback functions used to handle errors for a parsing context</p>
241<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div>
242 <hr/>
243 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetValidErrors"/>xmlRelaxNGSetValidErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetValidErrors (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx)<br/>
244</pre><p>Set the error and warning callback informations</p>
245<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
246 <hr/>
247 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetValidStructuredErrors"/>xmlRelaxNGSetValidStructuredErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetValidStructuredErrors (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/>
248</pre><p>Set the structured error callback</p>
249<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
250 <hr/>
251 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidateDoc"/>xmlRelaxNGValidateDoc ()</h3><pre class="programlisting">int xmlRelaxNGValidateDoc (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
252</pre><p>Validate a document tree in memory.</p>
253<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><span class="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>
254 <hr/>
255 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidateFullElement"/>xmlRelaxNGValidateFullElement ()</h3><pre class="programlisting">int xmlRelaxNGValidateFullElement (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
256</pre><p>Validate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded.</p>
257<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="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>
258 <hr/>
259 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePopElement"/>xmlRelaxNGValidatePopElement ()</h3><pre class="programlisting">int xmlRelaxNGValidatePopElement (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
260</pre><p>Pop the element end from the RelaxNG validation stack.</p>
261<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="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>
262 <hr/>
263 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushCData"/>xmlRelaxNGValidatePushCData ()</h3><pre class="programlisting">int xmlRelaxNGValidatePushCData (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len)<br/>
264</pre><p>check the CData parsed for validation in the current stack</p>
265<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="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>
266 <hr/>
267 <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushElement"/>xmlRelaxNGValidatePushElement ()</h3><pre class="programlisting">int xmlRelaxNGValidatePushElement (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
268</pre><p>Push a new element start on the RelaxNG validation stack.</p>
269<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="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>
270 <hr/>
271 <div class="refsect2" lang="en"><h3><a name="xmlRelaxParserSetFlag"/>xmlRelaxParserSetFlag ()</h3><pre class="programlisting">int xmlRelaxParserSetFlag (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> int flags)<br/>
272</pre><p>Semi private function used to pass informations to a parser context which are a combination of <a href="libxml2-relaxng.html#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a> .</p>
273<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a RelaxNG parser context</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of flags values</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success and -1 in case of error</td></tr></tbody></table></div></div>
274 <hr/>
275 </div>
276 </div>
277 </body>
278</html>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette