libxml-xmlschemas.html revision fc97906edfc501278820fdcd3fc05efcbded1538
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
4TD {font-family: Verdana,Arial,Helvetica}
5BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
6H1 {font-family: Verdana,Arial,Helvetica}
7H2 {font-family: Verdana,Arial,Helvetica}
8H3 {font-family: Verdana,Arial,Helvetica}
9A:link, A:visited, A:active { text-decoration: underline }
10</style><style type="text/css">
11      div.deprecated pre.programlisting {border-style: double;border-color:red}
12      pre.programlisting {border-style: double;background: #EECFA1}
13    </style><title>Module xmlschemas from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="/epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="/gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="/w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="/redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="/Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlschemas from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="/search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="/index.html">Main Menu</a></li><li><a style="font-weight:bold" href="/docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="/examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="/guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="/APIchunk0.html">Alphabetic</a></li><li><a href="/APIconstructors.html">Constructors</a></li><li><a href="/APIfunctions.html">Functions/Types</a></li><li><a href="/APIfiles.html">Modules</a></li><li><a href="/APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlsave.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlsave.html">xmlsave</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="/index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="/index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlschemastypes.html">xmlschemastypes</a></th><td><a accesskey="n" href="libxml-xmlschemastypes.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>interface to the XML Schemas handling and schema validity checking, it is incomplete right now. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlSchema">xmlSchema</a><br />struct _xmlSchema
14</pre><pre class="programlisting">Structure <a href="#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a><br />struct _xmlSchemaParserCtxt
15The content of this structure is not made public by the API.
16</pre><pre class="programlisting">Typedef <a href="libxml-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a> * <a name="xmlSchemaParserCtxtPtr" id="xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>
17</pre><pre class="programlisting">Typedef <a href="libxml-xmlschemas.html#xmlSchema">xmlSchema</a> * <a name="xmlSchemaPtr" id="xmlSchemaPtr">xmlSchemaPtr</a>
18</pre><pre class="programlisting">Structure <a href="#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a><br />struct _xmlSchemaValidCtxt
19The content of this structure is not made public by the API.
20</pre><pre class="programlisting">Typedef <a href="libxml-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a> * <a name="xmlSchemaValidCtxtPtr" id="xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>
21</pre><pre class="programlisting">Enum <a href="#xmlSchemaValidError">xmlSchemaValidError</a>
22</pre><pre class="programlisting">void	<a href="#xmlSchemaDump">xmlSchemaDump</a>			(FILE * output, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
23<pre class="programlisting">void	<a href="#xmlSchemaFree">xmlSchemaFree</a>			(<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
24<pre class="programlisting">void	<a href="#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a>		(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)</pre>
25<pre class="programlisting">void	<a href="#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre>
26<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	<a href="#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a>	(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
27<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	<a href="#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a>	(const char * buffer, <br />							 int size)</pre>
28<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	<a href="#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a>	(const char * URL)</pre>
29<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>	<a href="#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a>	(<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
30<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a>	<a href="#xmlSchemaParse">xmlSchemaParse</a>		(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)</pre>
31<pre class="programlisting">void	<a href="#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a>	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)</pre>
32<pre class="programlisting">void	<a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)</pre>
33<pre class="programlisting">int	<a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
34<pre class="programlisting">int	<a href="#xmlSchemaValidateStream">xmlSchemaValidateStream</a>		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br />					 <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br />					 <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br />					 void * user_data)</pre>
35<pre class="programlisting">Function type: <a href="#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a>
36void	<a href="#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a>	(void * ctx, <br />					 const char * msg, <br />					 ... ...)
37</pre>
38<pre class="programlisting">Function type: <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a>
39void	<a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a>	(void * ctx, <br />					 const char * msg, <br />					 ... ...)
40</pre>
41<h2>Description</h2>
42<h3><a name="xmlSchema" id="xmlSchema">Structure xmlSchema</a></h3><pre class="programlisting">Structure xmlSchema<br />struct _xmlSchema {
43    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	name	: schema name
44    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	targetNamespace	: the target namespace
45    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	version
46    const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *	id
47    <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a>	doc
48    <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>	annot
49    int	flags
50    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	typeDecl
51    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	attrDecl
52    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	attrgrpDecl
53    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	elemDecl
54    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	notaDecl
55    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	schemasImports
56    void *	_private	: unused by the library for users or bind
57    <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a>	groupDecl
58    <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a>	dict
59    void *	includes	: the includes, this is opaque for now
60    int	preserve	: whether to free the document
61}</pre><h3><a name="xmlSchemaParserCtxt" id="xmlSchemaParserCtxt">Structure xmlSchemaParserCtxt</a></h3><pre class="programlisting">Structure xmlSchemaParserCtxt<br />struct _xmlSchemaParserCtxt {
62The content of this structure is not made public by the API.
63}</pre><h3><a name="xmlSchemaValidCtxt" id="xmlSchemaValidCtxt">Structure xmlSchemaValidCtxt</a></h3><pre class="programlisting">Structure xmlSchemaValidCtxt<br />struct _xmlSchemaValidCtxt {
64The content of this structure is not made public by the API.
65}</pre><h3>Enum <a name="xmlSchemaValidError" id="xmlSchemaValidError">xmlSchemaValidError</a></h3><pre class="programlisting">Enum xmlSchemaValidError {
66    <a name="XML_SCHEMAS_ERR_OK" id="XML_SCHEMAS_ERR_OK">XML_SCHEMAS_ERR_OK</a> = 0
67    <a name="XML_SCHEMAS_ERR_NOROOT" id="XML_SCHEMAS_ERR_NOROOT">XML_SCHEMAS_ERR_NOROOT</a> = 1
68    <a name="XML_SCHEMAS_ERR_UNDECLAREDELEM" id="XML_SCHEMAS_ERR_UNDECLAREDELEM">XML_SCHEMAS_ERR_UNDECLAREDELEM</a> = 2
69    <a name="XML_SCHEMAS_ERR_NOTTOPLEVEL" id="XML_SCHEMAS_ERR_NOTTOPLEVEL">XML_SCHEMAS_ERR_NOTTOPLEVEL</a> = 3
70    <a name="XML_SCHEMAS_ERR_MISSING" id="XML_SCHEMAS_ERR_MISSING">XML_SCHEMAS_ERR_MISSING</a> = 4
71    <a name="XML_SCHEMAS_ERR_WRONGELEM" id="XML_SCHEMAS_ERR_WRONGELEM">XML_SCHEMAS_ERR_WRONGELEM</a> = 5
72    <a name="XML_SCHEMAS_ERR_NOTYPE" id="XML_SCHEMAS_ERR_NOTYPE">XML_SCHEMAS_ERR_NOTYPE</a> = 6
73    <a name="XML_SCHEMAS_ERR_NOROLLBACK" id="XML_SCHEMAS_ERR_NOROLLBACK">XML_SCHEMAS_ERR_NOROLLBACK</a> = 7
74    <a name="XML_SCHEMAS_ERR_ISABSTRACT" id="XML_SCHEMAS_ERR_ISABSTRACT">XML_SCHEMAS_ERR_ISABSTRACT</a> = 8
75    <a name="XML_SCHEMAS_ERR_NOTEMPTY" id="XML_SCHEMAS_ERR_NOTEMPTY">XML_SCHEMAS_ERR_NOTEMPTY</a> = 9
76    <a name="XML_SCHEMAS_ERR_ELEMCONT" id="XML_SCHEMAS_ERR_ELEMCONT">XML_SCHEMAS_ERR_ELEMCONT</a> = 10
77    <a name="XML_SCHEMAS_ERR_HAVEDEFAULT" id="XML_SCHEMAS_ERR_HAVEDEFAULT">XML_SCHEMAS_ERR_HAVEDEFAULT</a> = 11
78    <a name="XML_SCHEMAS_ERR_NOTNILLABLE" id="XML_SCHEMAS_ERR_NOTNILLABLE">XML_SCHEMAS_ERR_NOTNILLABLE</a> = 12
79    <a name="XML_SCHEMAS_ERR_EXTRACONTENT" id="XML_SCHEMAS_ERR_EXTRACONTENT">XML_SCHEMAS_ERR_EXTRACONTENT</a> = 13
80    <a name="XML_SCHEMAS_ERR_INVALIDATTR" id="XML_SCHEMAS_ERR_INVALIDATTR">XML_SCHEMAS_ERR_INVALIDATTR</a> = 14
81    <a name="XML_SCHEMAS_ERR_INVALIDELEM" id="XML_SCHEMAS_ERR_INVALIDELEM">XML_SCHEMAS_ERR_INVALIDELEM</a> = 15
82    <a name="XML_SCHEMAS_ERR_NOTDETERMINIST" id="XML_SCHEMAS_ERR_NOTDETERMINIST">XML_SCHEMAS_ERR_NOTDETERMINIST</a> = 16
83    <a name="XML_SCHEMAS_ERR_CONSTRUCT" id="XML_SCHEMAS_ERR_CONSTRUCT">XML_SCHEMAS_ERR_CONSTRUCT</a> = 17
84    <a name="XML_SCHEMAS_ERR_INTERNAL" id="XML_SCHEMAS_ERR_INTERNAL">XML_SCHEMAS_ERR_INTERNAL</a> = 18
85    <a name="XML_SCHEMAS_ERR_NOTSIMPLE" id="XML_SCHEMAS_ERR_NOTSIMPLE">XML_SCHEMAS_ERR_NOTSIMPLE</a> = 19
86    <a name="XML_SCHEMAS_ERR_ATTRUNKNOWN" id="XML_SCHEMAS_ERR_ATTRUNKNOWN">XML_SCHEMAS_ERR_ATTRUNKNOWN</a> = 20
87    <a name="XML_SCHEMAS_ERR_ATTRINVALID" id="XML_SCHEMAS_ERR_ATTRINVALID">XML_SCHEMAS_ERR_ATTRINVALID</a> = 21
88    <a name="XML_SCHEMAS_ERR_VALUE" id="XML_SCHEMAS_ERR_VALUE">XML_SCHEMAS_ERR_VALUE</a> = 22
89    <a name="XML_SCHEMAS_ERR_FACET" id="XML_SCHEMAS_ERR_FACET">XML_SCHEMAS_ERR_FACET</a> = 23
90    <a name="XML_SCHEMAS_ERR_" id="XML_SCHEMAS_ERR_">XML_SCHEMAS_ERR_</a> = 24
91    <a name="XML_SCHEMAS_ERR_XXX" id="XML_SCHEMAS_ERR_XXX">XML_SCHEMAS_ERR_XXX</a> = 25
92}
93</pre><h3><a name="xmlSchemaDump" id="xmlSchemaDump"></a>Function: xmlSchemaDump</h3><pre class="programlisting">void	xmlSchemaDump			(FILE * output, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
94</pre><p>Dump a Schema structure.</p>
95<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><h3><a name="xmlSchemaFree" id="xmlSchemaFree"></a>Function: xmlSchemaFree</h3><pre class="programlisting">void	xmlSchemaFree			(<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
96</pre><p>Deallocate a Schema structure.</p>
97<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><h3><a name="xmlSchemaFreeParserCtxt" id="xmlSchemaFreeParserCtxt"></a>Function: xmlSchemaFreeParserCtxt</h3><pre class="programlisting">void	xmlSchemaFreeParserCtxt		(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br />
98</pre><p>Free the resources associated to the schema parser context</p>
99<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><h3><a name="xmlSchemaFreeValidCtxt" id="xmlSchemaFreeValidCtxt"></a>Function: xmlSchemaFreeValidCtxt</h3><pre class="programlisting">void	xmlSchemaFreeValidCtxt		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
100</pre><p>Free the resources associated to the schema validation context</p>
101<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><h3><a name="xmlSchemaNewDocParserCtxt" id="xmlSchemaNewDocParserCtxt"></a>Function: xmlSchemaNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewDocParserCtxt	(<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
102</pre><p>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</p>
103<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><h3><a name="xmlSchemaNewMemParserCtxt" id="xmlSchemaNewMemParserCtxt"></a>Function: xmlSchemaNewMemParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewMemParserCtxt	(const char * buffer, <br />							 int size)<br />
104</pre><p>Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.</p>
105<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><h3><a name="xmlSchemaNewParserCtxt" id="xmlSchemaNewParserCtxt"></a>Function: xmlSchemaNewParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>	xmlSchemaNewParserCtxt	(const char * URL)<br />
106</pre><p>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</p>
107<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><h3><a name="xmlSchemaNewValidCtxt" id="xmlSchemaNewValidCtxt"></a>Function: xmlSchemaNewValidCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>	xmlSchemaNewValidCtxt	(<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
108</pre><p>Create an XML Schemas validation context based on the given schema</p>
109<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 Schemas</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><h3><a name="xmlSchemaParse" id="xmlSchemaParse"></a>Function: xmlSchemaParse</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a>	xmlSchemaParse		(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br />
110</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>
111<div class="variablelist"><table border="0"><col align="left" /><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>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserErrors" id="xmlSchemaSetParserErrors"></a>Function: xmlSchemaSetParserErrors</h3><pre class="programlisting">void	xmlSchemaSetParserErrors	(<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)<br />
112</pre><p>Set the callback functions used to handle errors for a validation context</p>
113<div class="variablelist"><table border="0"><col align="left" /><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><h3><a name="xmlSchemaSetValidErrors" id="xmlSchemaSetValidErrors"></a>Function: xmlSchemaSetValidErrors</h3><pre class="programlisting">void	xmlSchemaSetValidErrors		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br />					 <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br />					 void * ctx)<br />
114</pre><p>Set the error and warning callback informations</p>
115<div class="variablelist"><table border="0"><col align="left" /><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><h3><a name="xmlSchemaValidateDoc" id="xmlSchemaValidateDoc"></a>Function: xmlSchemaValidateDoc</h3><pre class="programlisting">int	xmlSchemaValidateDoc		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
116</pre><p>Validate a document tree in memory.</p>
117<div class="variablelist"><table border="0"><col align="left" /><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>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 schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateStream" id="xmlSchemaValidateStream"></a>Function: xmlSchemaValidateStream</h3><pre class="programlisting">int	xmlSchemaValidateStream		(<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br />					 <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br />					 <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br />					 <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br />					 void * user_data)<br />
118</pre><p>Validate a document tree in memory.</p>
119<div class="variablelist"><table border="0"><col align="left" /><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"><i><tt>Returns</tt></i>:</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><h3><a name="xmlSchemaValidityErrorFunc" id="xmlSchemaValidityErrorFunc"></a>Function type: xmlSchemaValidityErrorFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityErrorFunc
120void	xmlSchemaValidityErrorFunc	(void * ctx, <br />					 const char * msg, <br />					 ... ...)
121</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><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><br />
122<h3><a name="xmlSchemaValidityWarningFunc" id="xmlSchemaValidityWarningFunc"></a>Function type: xmlSchemaValidityWarningFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityWarningFunc
123void	xmlSchemaValidityWarningFunc	(void * ctx, <br />					 const char * msg, <br />					 ... ...)
124</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><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><br />
125<p><a href="/bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
126