| <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"> |
| .synopsis, .classsynopsis { |
| background: #eeeeee; |
| border: solid 1px #aaaaaa; |
| padding: 0.5em; |
| } |
| .programlisting { |
| background: #eeeeff; |
| border: solid 1px #aaaaff; |
| padding: 0.5em; |
| } |
| .variablelist { |
| padding: 4px; |
| margin-left: 3em; |
| } |
| .navigation { |
| background: #ffeeee; |
| border: solid 1px #ffaaaa; |
| margin-top: 0.5em; |
| margin-bottom: 0.5em; |
| } |
| .navigation a { |
| color: #770000; |
| } |
| .navigation a:visited { |
| color: #550000; |
| } |
| .navigation .title { |
| font-size: 200%; |
| } |
| </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"> |
| |
| |
| |
| enum <a href="libxml-xmlschemas.html#xmlSchemaValidError">xmlSchemaValidError</a>; |
| struct <a href="libxml-xmlschemas.html#xmlSchema">xmlSchema</a>; |
| typedef <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a>; |
| void (<a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">*xmlSchemaValidityErrorFunc</a>) (void *ctx, |
| const char *msg, |
| ...); |
| void (<a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">*xmlSchemaValidityWarningFunc</a>) (void *ctx, |
| const char *msg, |
| ...); |
| struct <a href="libxml-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a>; |
| typedef <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>; |
| struct <a href="libxml-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a>; |
| typedef <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>; |
| <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a> |
| (const char *URL); |
| <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a> |
| (const char *buffer, |
| int size); |
| void <a href="libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt); |
| void <a href="libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
| void *ctx); |
| <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); |
| void <a href="libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a> (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); |
| void <a href="libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a> (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *output, |
| <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema); |
| void <a href="libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
| void *ctx); |
| <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); |
| void <a href="libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt); |
| int <a href="libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance); |
| int <a href="libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, |
| <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, |
| <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, |
| <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, |
| void *user_data); |
| </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p> |
| |
| </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 { |
| XML_SCHEMAS_ERR_OK = 0, |
| XML_SCHEMAS_ERR_NOROOT = 1, |
| XML_SCHEMAS_ERR_UNDECLAREDELEM, |
| XML_SCHEMAS_ERR_NOTTOPLEVEL, |
| XML_SCHEMAS_ERR_MISSING, |
| XML_SCHEMAS_ERR_WRONGELEM, |
| XML_SCHEMAS_ERR_NOTYPE, |
| XML_SCHEMAS_ERR_NOROLLBACK, |
| XML_SCHEMAS_ERR_ISABSTRACT, |
| XML_SCHEMAS_ERR_NOTEMPTY, |
| XML_SCHEMAS_ERR_ELEMCONT, |
| XML_SCHEMAS_ERR_HAVEDEFAULT, |
| XML_SCHEMAS_ERR_NOTNILLABLE, |
| XML_SCHEMAS_ERR_EXTRACONTENT, |
| XML_SCHEMAS_ERR_INVALIDATTR, |
| XML_SCHEMAS_ERR_INVALIDELEM, |
| XML_SCHEMAS_ERR_NOTDETERMINIST, |
| XML_SCHEMAS_ERR_CONSTRUCT, |
| XML_SCHEMAS_ERR_INTERNAL, |
| XML_SCHEMAS_ERR_NOTSIMPLE, |
| XML_SCHEMAS_ERR_ATTRUNKNOWN, |
| XML_SCHEMAS_ERR_ATTRINVALID, |
| XML_SCHEMAS_ERR_VALUE, |
| XML_SCHEMAS_ERR_FACET, |
| XML_SCHEMAS_ERR_, |
| XML_SCHEMAS_ERR_XXX |
| } xmlSchemaValidError; |
| </pre><p> |
| |
| </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 { |
| xmlChar *name; /* schema name */ |
| xmlChar *targetNamespace; /* the target namespace */ |
| xmlChar *version; |
| xmlChar *id; |
| xmlDocPtr doc; |
| xmlSchemaAnnotPtr annot; |
| int flags; |
| |
| xmlHashTablePtr typeDecl; |
| xmlHashTablePtr attrDecl; |
| xmlHashTablePtr attrgrpDecl; |
| xmlHashTablePtr elemDecl; |
| xmlHashTablePtr notaDecl; |
| |
| xmlHashTablePtr schemasImports; |
| |
| void *_private; /* unused by the library for users or bindings */ |
| xmlHashTablePtr groupDecl; |
| }; |
| </pre><p> |
| |
| </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaPtr"></a>xmlSchemaPtr</h3><pre class="programlisting">typedef xmlSchema *xmlSchemaPtr; |
| </pre><p> |
| |
| </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, |
| const char *msg, |
| ...);</pre><p> |
| |
| </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> |
| </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> |
| </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> |
| |
| |
| </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, |
| const char *msg, |
| ...);</pre><p> |
| |
| </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> |
| </td></tr><tr><td><span class="term"><i><tt>msg</tt></i> :</span></td><td> |
| </td></tr><tr><td><span class="term"><i><tt>...</tt></i> :</span></td><td> |
| |
| |
| </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> |
| |
| </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaParserCtxtPtr"></a>xmlSchemaParserCtxtPtr</h3><pre class="programlisting">typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr; |
| </pre><p> |
| |
| </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> |
| A Schemas validation context</p><p> |
| |
| </p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxtPtr"></a>xmlSchemaValidCtxtPtr</h3><pre class="programlisting">typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr; |
| </pre><p> |
| |
| </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 |
| (const char *URL);</pre><p> |
| Create an XML Schemas parse context for that file/resource expected |
| to contain an XML Schemas file.</p><p> |
| |
| </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> the location of the schema |
| </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the parser context or NULL in case of error |
| </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 |
| (const char *buffer, |
| int size);</pre><p> |
| Create an XML Schemas parse context for that memory buffer expected |
| to contain an XML Schemas file.</p><p> |
| |
| </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> 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"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the parser context or NULL in case of error |
| </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> |
| Free the resources associated to the schema parser context</p><p> |
| |
| </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> the schema parser context |
| </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, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
| void *ctx);</pre><p> |
| Set the callback functions used to handle errors for a validation context</p><p> |
| |
| </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> a schema 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><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> |
| parse a schema definition resource and build an internal |
| XML Shema struture which can be used to validate instances. |
| *WARNING* this interface is highly subject to change</p><p> |
| |
| </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> a schema validation context |
| </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the internal XML Schema structure built from the resource or |
| NULL in case of error |
| </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> |
| Deallocate a Schema structure.</p><p> |
| |
| </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> a schema structure |
| </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, |
| <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);</pre><p> |
| Dump a Schema structure.</p><p> |
| |
| </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> 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><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, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, |
| <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, |
| void *ctx);</pre><p> |
| Set the error and warning callback informations</p><p> |
| |
| </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> a schema 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><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> |
| Create an XML Schemas validation context based on the given schema</p><p> |
| |
| </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> a precompiled XML Schemas |
| </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the validation context or NULL in case of error |
| </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> |
| Free the resources associated to the schema validation context</p><p> |
| |
| </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> the schema validation context |
| </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, |
| <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance);</pre><p> |
| Validate a document tree in memory.</p><p> |
| |
| </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> a schema validation context |
| </td></tr><tr><td><span class="term"><i><tt>instance</tt></i> :</span></td><td> |
| </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the document is schemas valid, a positive error code |
| number otherwise and -1 in case of internal or API error. |
| </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, |
| <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, |
| <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, |
| <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, |
| void *user_data);</pre><p> |
| Validate a document tree in memory.</p><p> |
| |
| </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> a schema validation context |
| </td></tr><tr><td><span class="term"><i><tt>input</tt></i> :</span></td><td> the input to use for reading the data |
| </td></tr><tr><td><span class="term"><i><tt>enc</tt></i> :</span></td><td> an optional encoding information |
| </td></tr><tr><td><span class="term"><i><tt>sax</tt></i> :</span></td><td> a SAX handler for the resulting events |
| </td></tr><tr><td><span class="term"><i><tt>user_data</tt></i> :</span></td><td> the context to provide to the SAX handler. |
| </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 if the document is schemas valid, a positive error code |
| number otherwise and -1 in case of internal or API error. |
| </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> |