Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlschemas</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css"> |
| 3 | .synopsis, .classsynopsis { |
| 4 | background: #eeeeee; |
| 5 | border: solid 1px #aaaaaa; |
| 6 | padding: 0.5em; |
| 7 | } |
| 8 | .programlisting { |
| 9 | background: #eeeeff; |
| 10 | border: solid 1px #aaaaff; |
| 11 | padding: 0.5em; |
| 12 | } |
| 13 | .variablelist { |
| 14 | padding: 4px; |
| 15 | margin-left: 3em; |
| 16 | } |
| 17 | .navigation { |
| 18 | background: #ffeeee; |
| 19 | border: solid 1px #ffaaaa; |
| 20 | margin-top: 0.5em; |
| 21 | margin-bottom: 0.5em; |
| 22 | } |
| 23 | .navigation a { |
| 24 | color: #770000; |
| 25 | } |
| 26 | .navigation a:visited { |
| 27 | color: #550000; |
| 28 | } |
| 29 | .navigation .title { |
| 30 | font-size: 200%; |
| 31 | } |
| 32 | </style><link rel="home" href="index.html" title="Gnome XML Library Reference Manual"><link rel="up" href="libxml-lib.html" title="Libxml Library Reference"><link rel="previous" href="libxml-xmlunicode.html" title="xmlunicode"><link rel="next" href="libxml-xmlschemastypes.html" title="xmlschemastypes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlunicode.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="libxml-lib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">Gnome XML Library Reference Manual</th><td><a accesskey="n" href="libxml-xmlschemastypes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-xmlschemas"></a><div class="titlepage"></div><div class="refnamediv"><h2>xmlschemas</h2><p>xmlschemas — </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis"> |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 33 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 34 | |
| 35 | |
| 36 | enum <a href="libxml-xmlschemas.html#xmlSchemaValidError">xmlSchemaValidError</a>; |
| 37 | struct <a href="libxml-xmlschemas.html#xmlSchema">xmlSchema</a>; |
| 38 | typedef <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a>; |
| 39 | void (<a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">*xmlSchemaValidityErrorFunc</a>) (void *ctx, |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 40 | const char *msg, |
| 41 | ...); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 42 | void (<a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">*xmlSchemaValidityWarningFunc</a>) (void *ctx, |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 43 | const char *msg, |
| 44 | ...); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 45 | struct <a href="libxml-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a>; |
| 46 | typedef <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>; |
| 47 | struct <a href="libxml-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a>; |
| 48 | typedef <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>; |
| 49 | <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a> |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 50 | (const char *URL); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 51 | <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a> |
Daniel Veillard | aec6356 | 2003-03-23 20:42:17 +0000 | [diff] [blame] | 52 | (const char *buffer, |
| 53 | int size); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 54 | void <a href="libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt); |
| 55 | void <a href="libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, |
| 56 | <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| 57 | <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 58 | void *ctx); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 59 | <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> <a href="libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt); |
| 60 | void <a href="libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a> (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); |
| 61 | void <a href="libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *output, |
| 62 | <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); |
| 63 | void <a href="libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| 64 | <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| 65 | <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 66 | void *ctx); |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 67 | <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> <a href="libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); |
| 68 | void <a href="libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt); |
| 69 | int <a href="libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| 70 | <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance); |
| 71 | int <a href="libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| 72 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, |
| 73 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, |
| 74 | <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, |
| 75 | void *user_data); |
| 76 | </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p> |
| 77 | |
| 78 | </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidError"></a>enum xmlSchemaValidError</h3><pre class="programlisting">typedef enum { |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 79 | XML_SCHEMAS_ERR_OK = 0, |
| 80 | XML_SCHEMAS_ERR_NOROOT = 1, |
| 81 | XML_SCHEMAS_ERR_UNDECLAREDELEM, |
| 82 | XML_SCHEMAS_ERR_NOTTOPLEVEL, |
| 83 | XML_SCHEMAS_ERR_MISSING, |
| 84 | XML_SCHEMAS_ERR_WRONGELEM, |
| 85 | XML_SCHEMAS_ERR_NOTYPE, |
| 86 | XML_SCHEMAS_ERR_NOROLLBACK, |
| 87 | XML_SCHEMAS_ERR_ISABSTRACT, |
| 88 | XML_SCHEMAS_ERR_NOTEMPTY, |
| 89 | XML_SCHEMAS_ERR_ELEMCONT, |
| 90 | XML_SCHEMAS_ERR_HAVEDEFAULT, |
| 91 | XML_SCHEMAS_ERR_NOTNILLABLE, |
| 92 | XML_SCHEMAS_ERR_EXTRACONTENT, |
| 93 | XML_SCHEMAS_ERR_INVALIDATTR, |
| 94 | XML_SCHEMAS_ERR_INVALIDELEM, |
| 95 | XML_SCHEMAS_ERR_NOTDETERMINIST, |
| 96 | XML_SCHEMAS_ERR_CONSTRUCT, |
| 97 | XML_SCHEMAS_ERR_INTERNAL, |
| 98 | XML_SCHEMAS_ERR_NOTSIMPLE, |
| 99 | XML_SCHEMAS_ERR_ATTRUNKNOWN, |
| 100 | XML_SCHEMAS_ERR_ATTRINVALID, |
Daniel Veillard | c2d4a93 | 2003-04-01 11:13:05 +0000 | [diff] [blame] | 101 | XML_SCHEMAS_ERR_VALUE, |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 102 | XML_SCHEMAS_ERR_FACET, |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 103 | XML_SCHEMAS_ERR_, |
| 104 | XML_SCHEMAS_ERR_XXX |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 105 | } xmlSchemaValidError; |
| 106 | </pre><p> |
| 107 | |
| 108 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchema"></a>struct xmlSchema</h3><pre class="programlisting">struct xmlSchema { |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 109 | xmlChar *name; /* schema name */ |
| 110 | xmlChar *targetNamespace; /* the target namespace */ |
| 111 | xmlChar *version; |
| 112 | xmlChar *id; |
| 113 | xmlDocPtr doc; |
| 114 | xmlSchemaAnnotPtr annot; |
| 115 | int flags; |
| 116 | |
| 117 | xmlHashTablePtr typeDecl; |
| 118 | xmlHashTablePtr attrDecl; |
| 119 | xmlHashTablePtr attrgrpDecl; |
| 120 | xmlHashTablePtr elemDecl; |
| 121 | xmlHashTablePtr notaDecl; |
Daniel Veillard | aec6356 | 2003-03-23 20:42:17 +0000 | [diff] [blame] | 122 | |
| 123 | xmlHashTablePtr schemasImports; |
| 124 | |
| 125 | void *_private; /* unused by the library for users or bindings */ |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 126 | }; |
| 127 | </pre><p> |
| 128 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 129 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaPtr"></a>xmlSchemaPtr</h3><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 130 | |
| 131 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityErrorFunc"></a>xmlSchemaValidityErrorFunc ()</h3><pre class="programlisting">void (*xmlSchemaValidityErrorFunc) (void *ctx, |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 132 | const char *msg, |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 133 | ...);</pre><p> |
| 134 | |
| 135 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> |
| 136 | </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> |
| 137 | </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> |
| 138 | |
| 139 | |
| 140 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityWarningFunc"></a>xmlSchemaValidityWarningFunc ()</h3><pre class="programlisting">void (*xmlSchemaValidityWarningFunc) (void *ctx, |
Daniel Veillard | 4826743 | 2002-10-18 11:21:38 +0000 | [diff] [blame] | 141 | const char *msg, |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 142 | ...);</pre><p> |
| 143 | |
| 144 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> |
| 145 | </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> |
| 146 | </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> |
| 147 | |
| 148 | |
| 149 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaParserCtxt"></a>struct xmlSchemaParserCtxt</h3><pre class="programlisting">struct xmlSchemaParserCtxt;</pre><p> |
| 150 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 151 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaParserCtxtPtr"></a>xmlSchemaParserCtxtPtr</h3><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 152 | |
| 153 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxt"></a>struct xmlSchemaValidCtxt</h3><pre class="programlisting">struct xmlSchemaValidCtxt;</pre><p> |
| 154 | A Schemas validation context</p><p> |
| 155 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 156 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxtPtr"></a>xmlSchemaValidCtxtPtr</h3><p> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 157 | |
| 158 | </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaNewParserCtxt"></a>xmlSchemaNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewParserCtxt |
| 159 | (const char *URL);</pre><p> |
| 160 | Create an XML Schemas parse context for that file/resource expected |
| 161 | to contain an XML Schemas file.</p><p> |
| 162 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 163 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>URL</tt></i> :</span></td><td> |
| 164 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> |
| 165 | |
| 166 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 167 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaNewMemParserCtxt"></a>xmlSchemaNewMemParserCtxt ()</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewMemParserCtxt |
Daniel Veillard | aec6356 | 2003-03-23 20:42:17 +0000 | [diff] [blame] | 168 | (const char *buffer, |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 169 | int size);</pre><p> |
| 170 | Create an XML Schemas parse context for that memory buffer expected |
| 171 | to contain an XML Schemas file.</p><p> |
| 172 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 173 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>buffer</tt></i> :</span></td><td> |
| 174 | </td></tr><tr><td><span class="term"><i><tt>size</tt></i> :</span></td><td> |
| 175 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> |
| 176 | |
| 177 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 178 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeParserCtxt"></a>xmlSchemaFreeParserCtxt ()</h3><pre class="programlisting">void xmlSchemaFreeParserCtxt (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt);</pre><p> |
| 179 | Free the resources associated to the schema parser context</p><p> |
| 180 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 181 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> |
| 182 | |
| 183 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 184 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaSetParserErrors"></a>xmlSchemaSetParserErrors ()</h3><pre class="programlisting">void xmlSchemaSetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, |
| 185 | <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| 186 | <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
| 187 | void *ctx);</pre><p> |
| 188 | Set the callback functions used to handle errors for a validation context</p><p> |
| 189 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 190 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> |
| 191 | </td></tr><tr><td><span class="term"><i><tt>err</tt></i> :</span></td><td> |
| 192 | </td></tr><tr><td><span class="term"><i><tt>warn</tt></i> :</span></td><td> |
| 193 | </td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> |
| 194 | |
| 195 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 196 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaParse"></a>xmlSchemaParse ()</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> xmlSchemaParse (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt);</pre><p> |
| 197 | parse a schema definition resource and build an internal |
Daniel Veillard | 80ce373 | 2002-10-07 17:39:30 +0000 | [diff] [blame] | 198 | XML Shema struture which can be used to validate instances. |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 199 | *WARNING* this interface is highly subject to change</p><p> |
| 200 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 201 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> |
| 202 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> |
| 203 | |
| 204 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 205 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaFree"></a>xmlSchemaFree ()</h3><pre class="programlisting">void xmlSchemaFree (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);</pre><p> |
| 206 | Deallocate a Schema structure.</p><p> |
| 207 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 208 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td> |
| 209 | |
| 210 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 211 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaDump"></a>xmlSchemaDump ()</h3><pre class="programlisting">void xmlSchemaDump (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *output, |
| 212 | <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);</pre><p> |
| 213 | Dump a Schema structure.</p><p> |
| 214 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 215 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>output</tt></i> :</span></td><td> |
| 216 | </td></tr><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td> |
| 217 | |
| 218 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 219 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidErrors"></a>xmlSchemaSetValidErrors ()</h3><pre class="programlisting">void xmlSchemaSetValidErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| 220 | <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| 221 | <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
| 222 | void *ctx);</pre><p> |
| 223 | Set the error and warning callback informations</p><p> |
| 224 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 225 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> |
| 226 | </td></tr><tr><td><span class="term"><i><tt>err</tt></i> :</span></td><td> |
| 227 | </td></tr><tr><td><span class="term"><i><tt>warn</tt></i> :</span></td><td> |
| 228 | </td></tr><tr><td><span class="term"><i><tt>ctx</tt></i> :</span></td><td> |
| 229 | |
| 230 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 231 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaNewValidCtxt"></a>xmlSchemaNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> xmlSchemaNewValidCtxt (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);</pre><p> |
| 232 | Create an XML Schemas validation context based on the given schema</p><p> |
| 233 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 234 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>schema</tt></i> :</span></td><td> |
| 235 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> |
| 236 | |
| 237 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 238 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeValidCtxt"></a>xmlSchemaFreeValidCtxt ()</h3><pre class="programlisting">void xmlSchemaFreeValidCtxt (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);</pre><p> |
| 239 | Free the resources associated to the schema validation context</p><p> |
| 240 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 241 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> |
| 242 | |
| 243 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 244 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateDoc"></a>xmlSchemaValidateDoc ()</h3><pre class="programlisting">int xmlSchemaValidateDoc (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| 245 | <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance);</pre><p> |
| 246 | Validate a document tree in memory.</p><p> |
| 247 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 248 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 249 | </td></tr><tr><td><span class="term"><i><tt>instance</tt></i> :</span></td><td> |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 250 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> |
| 251 | |
| 252 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 253 | </td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateStream"></a>xmlSchemaValidateStream ()</h3><pre class="programlisting">int xmlSchemaValidateStream (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| 254 | <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, |
| 255 | <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, |
| 256 | <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, |
| 257 | void *user_data);</pre><p> |
| 258 | Validate a document tree in memory.</p><p> |
| 259 | |
Daniel Veillard | 93d9525 | 2003-04-29 20:25:40 +0000 | [diff] [blame] | 260 | </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i> :</span></td><td> |
| 261 | </td></tr><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> |
| 262 | </td></tr><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> |
| 263 | </td></tr><tr><td><span class="term"><i><tt>sax</tt></i> :</span></td><td> |
| 264 | </td></tr><tr><td><span class="term"><i><tt>user_data</tt></i> :</span></td><td> |
| 265 | </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> |
| 266 | |
| 267 | |
Daniel Veillard | d433046 | 2003-04-29 12:40:16 +0000 | [diff] [blame] | 268 | </td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-xmlunicode.html"><b><< xmlunicode</b></a></td><td align="right"><a accesskey="n" href="libxml-xmlschemastypes.html"><b>xmlschemastypes >></b></a></td></tr></table></body></html> |