1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

applied patch from Marcus Boerger to route relaxng and schemas error

* error.c relaxng.c xmlreader.c xmlschemas.c include/libxml/relaxng.h
  include/libxml/xmlschemas.h: applied patch from Marcus Boerger
  to route relaxng and schemas error messages when using the reader
  through the structured interface if activated.
* elfgcchack.h doc/* testapi.c: rebuilt since this add  new APIs
  to test.
Daniel
This commit is contained in:
Daniel Veillard 2005-07-13 23:07:49 +00:00
parent 358fef4b1e
commit da0aa4cfdb
21 changed files with 401 additions and 94 deletions

View File

@ -1,3 +1,12 @@
Thu Jul 14 01:03:03 CEST 2005 Daniel Veillard <daniel@veillard.com>
* error.c relaxng.c xmlreader.c xmlschemas.c include/libxml/relaxng.h
include/libxml/xmlschemas.h: applied patch from Marcus Boerger
to route relaxng and schemas error messages when using the reader
through the structured interface if activated.
* elfgcchack.h doc/* testapi.c: rebuilt since this add new APIs
to test.
Wed Jul 13 18:35:47 CEST 2005 Daniel Veillard <daniel@veillard.com>
* HTMLparser.c: applied UTF-8 script parsing bug #310229 fix from

View File

@ -399,9 +399,11 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
<a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />

View File

@ -670,7 +670,9 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
</dd><dt>structured</dt><dd><a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
</dd><dt>structured</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
</dd><dt>structures</dt><dd><a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br />
<a href="html/libxml-tree.html#xmlFreeNs">xmlFreeNs</a><br />
<a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />

View File

@ -165,6 +165,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
</dd><dt>RelaxNG</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />

View File

@ -158,36 +158,6 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>Semi</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
</dd><dt>Send</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
</dd><dt>Serialize</dt><dd><a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
</dd><dt>Set</dt><dd><a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
<a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
<a href="html/libxml-SAX.html#setNamespace">setNamespace</a><br />
<a href="html/libxml-xlink.html#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a><br />
<a href="html/libxml-xlink.html#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a><br />
<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
<a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br />
<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
<a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
<a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
<a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br />
<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a><br />
<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a><br />
<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
</dd><dt>Sets</dt><dd><a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />

View File

@ -941,6 +941,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a><br />
@ -2700,6 +2701,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a><br />

View File

@ -792,6 +792,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
<a href="html/libxml-SAX2.html#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a><br />
@ -831,6 +832,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
@ -1759,6 +1761,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</p><h2>Type xmlRelaxNGValidCtxtPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
@ -1860,6 +1863,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
@ -1898,7 +1902,9 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
</p><h2>Type xmlStructuredErrorFunc:</h2><p><a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
</p><h2>Type xmlStructuredErrorFunc:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
<a href="html/libxml-globals.html#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a><br />
</p><h2>Type xmlTextReaderErrorFunc:</h2><p><a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />

View File

@ -2455,6 +2455,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a><br />
@ -2607,6 +2608,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
<a href="html/libxml-schemasInternals.html#xmlSchemaType">xmlSchemaType</a><br />
<a href="html/libxml-schemasInternals.html#xmlSchemaTypeLink">xmlSchemaTypeLink</a><br />
<a href="html/libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a><br />

View File

@ -37,6 +37,7 @@ The content of this structure is not made public by the API.
<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> <a href="#xmlRelaxNGParse">xmlRelaxNGParse</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)</pre>
<pre class="programlisting">void <a href="#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)</pre>
<pre class="programlisting">void <a href="#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)</pre>
<pre class="programlisting">void <a href="#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre>
<pre class="programlisting">int <a href="#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
<pre class="programlisting">int <a href="#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
<pre class="programlisting">int <a href="#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
@ -135,7 +136,9 @@ The content of this structure is not made public by the API.
</pre><p>Set the callback functions used to handle errors for a validation context</p>
<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><h3><a name="xmlRelaxNGSetValidErrors" id="xmlRelaxNGSetValidErrors"></a>Function: xmlRelaxNGSetValidErrors</h3><pre class="programlisting">void xmlRelaxNGSetValidErrors (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)<br />
</pre><p>Set the error and warning callback informations</p>
<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><h3><a name="xmlRelaxNGValidateDoc" id="xmlRelaxNGValidateDoc"></a>Function: xmlRelaxNGValidateDoc</h3><pre class="programlisting">int xmlRelaxNGValidateDoc (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
<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><h3><a name="xmlRelaxNGSetValidStructuredErrors" id="xmlRelaxNGSetValidStructuredErrors"></a>Function: xmlRelaxNGSetValidStructuredErrors</h3><pre class="programlisting">void xmlRelaxNGSetValidStructuredErrors (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br />
</pre><p>Set the structured error callback</p>
<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><h3><a name="xmlRelaxNGValidateDoc" id="xmlRelaxNGValidateDoc"></a>Function: xmlRelaxNGValidateDoc</h3><pre class="programlisting">int xmlRelaxNGValidateDoc (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
</pre><p>Validate a document tree in memory.</p>
<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><h3><a name="xmlRelaxNGValidateFullElement" id="xmlRelaxNGValidateFullElement"></a>Function: xmlRelaxNGValidateFullElement</h3><pre class="programlisting">int xmlRelaxNGValidateFullElement (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
</pre><p>Validate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded.</p>

View File

@ -40,6 +40,7 @@ The content of this structure is not made public by the API.
<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>
<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>
<pre class="programlisting">int <a href="#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)</pre>
<pre class="programlisting">void <a href="#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre>
<pre class="programlisting">int <a href="#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre>
<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>
<pre class="programlisting">int <a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> const char * filename, <br /> int options)</pre>
@ -145,7 +146,9 @@ The content of this structure is not made public by the API.
</pre><p>Set the error and warning callback informations</p>
<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="xmlSchemaSetValidOptions" id="xmlSchemaSetValidOptions"></a>Function: xmlSchemaSetValidOptions</h3><pre class="programlisting">int xmlSchemaSetValidOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)<br />
</pre><p>Sets the options to be used during the validation.</p>
<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>options</tt></i>:</span></td><td>a combination of <a href="libxml-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidCtxtGetOptions" id="xmlSchemaValidCtxtGetOptions"></a>Function: xmlSchemaValidCtxtGetOptions</h3><pre class="programlisting">int xmlSchemaValidCtxtGetOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
<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>options</tt></i>:</span></td><td>a combination of <a href="libxml-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidStructuredErrors" id="xmlSchemaSetValidStructuredErrors"></a>Function: xmlSchemaSetValidStructuredErrors</h3><pre class="programlisting">void xmlSchemaSetValidStructuredErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br />
</pre><p>Set the structured error callback</p>
<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>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><h3><a name="xmlSchemaValidCtxtGetOptions" id="xmlSchemaValidCtxtGetOptions"></a>Function: xmlSchemaValidCtxtGetOptions</h3><pre class="programlisting">int xmlSchemaValidCtxtGetOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
</pre><p>Get the validation context options.</p>
<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 option combination or -1 on error.</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 />
</pre><p>Validate a document tree in memory.</p>

View File

@ -1033,17 +1033,18 @@
<exports symbol='xmlRelaxNGSetValidErrors' type='function'/>
<exports symbol='xmlRelaxNGNewParserCtxt' type='function'/>
<exports symbol='xmlRelaxNGGetParserErrors' type='function'/>
<exports symbol='xmlRelaxNGSetParserErrors' type='function'/>
<exports symbol='xmlRelaxNGValidatePopElement' type='function'/>
<exports symbol='xmlRelaxNGNewValidCtxt' type='function'/>
<exports symbol='xmlRelaxNGNewMemParserCtxt' type='function'/>
<exports symbol='xmlRelaxNGDump' type='function'/>
<exports symbol='xmlRelaxNGValidityErrorFunc' type='function'/>
<exports symbol='xmlRelaxNGSetParserErrors' type='function'/>
<exports symbol='xmlRelaxNGParse' type='function'/>
<exports symbol='xmlRelaxNGValidatePushElement' type='function'/>
<exports symbol='xmlRelaxNGValidateFullElement' type='function'/>
<exports symbol='xmlRelaxNGValidatePopElement' type='function'/>
<exports symbol='xmlRelaxNGValidityErrorFunc' type='function'/>
<exports symbol='xmlRelaxNGValidatePushElement' type='function'/>
<exports symbol='xmlRelaxNGFree' type='function'/>
<exports symbol='xmlRelaxNGValidateDoc' type='function'/>
<exports symbol='xmlRelaxNGSetValidStructuredErrors' type='function'/>
<exports symbol='xmlRelaxNGFreeParserCtxt' type='function'/>
<exports symbol='xmlRelaxNGGetValidErrors' type='function'/>
<exports symbol='xmlRelaxNGInitTypes' type='function'/>
@ -2883,7 +2884,7 @@
<exports symbol='xmlSchemaValidateStream' type='function'/>
<exports symbol='xmlSchemaGetParserErrors' type='function'/>
<exports symbol='xmlSchemaValidateOneElement' type='function'/>
<exports symbol='xmlSchemaDump' type='function'/>
<exports symbol='xmlSchemaSetValidStructuredErrors' type='function'/>
<exports symbol='xmlSchemaSetValidErrors' type='function'/>
<exports symbol='xmlSchemaValidCtxtGetOptions' type='function'/>
<exports symbol='xmlSchemaValidateFile' type='function'/>
@ -2894,6 +2895,7 @@
<exports symbol='xmlSchemaSetValidOptions' type='function'/>
<exports symbol='xmlSchemaSetParserErrors' type='function'/>
<exports symbol='xmlSchemaValidityWarningFunc' type='function'/>
<exports symbol='xmlSchemaDump' type='function'/>
<exports symbol='xmlSchemaFreeValidCtxt' type='function'/>
<exports symbol='xmlSchemaNewValidCtxt' type='function'/>
</file>
@ -12233,6 +12235,14 @@ actually an xmlCharEncoding'/>
<arg name='warn' type='xmlRelaxNGValidityWarningFunc' info='the warning function'/>
<arg name='ctx' type='void *' info='the functions context'/>
</function>
<function name='xmlRelaxNGSetValidStructuredErrors' file='relaxng' module='relaxng'>
<cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
<info>Set the structured error callback</info>
<return type='void'/>
<arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='a Relax-NG validation context'/>
<arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
<arg name='ctx' type='void *' info='the functions context'/>
</function>
<function name='xmlRelaxNGValidateDoc' file='relaxng' module='relaxng'>
<cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
<info>Validate a document tree in memory.</info>
@ -13038,6 +13048,14 @@ actually an xmlCharEncoding'/>
<arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
<arg name='options' type='int' info='a combination of xmlSchemaValidOption'/>
</function>
<function name='xmlSchemaSetValidStructuredErrors' file='xmlschemas' module='xmlschemas'>
<cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
<info>Set the structured error callback</info>
<return type='void'/>
<arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
<arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
<arg name='ctx' type='void *' info='the functions context'/>
</function>
<function name='xmlSchemaValPredefTypeNode' file='xmlschemastypes' module='xmlschemastypes'>
<cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
<info>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</info>

View File

@ -2449,6 +2449,7 @@
<reference name='xmlRelaxNGPtr' href='html/libxml-relaxng.html#xmlRelaxNGPtr'/>
<reference name='xmlRelaxNGSetParserErrors' href='html/libxml-relaxng.html#xmlRelaxNGSetParserErrors'/>
<reference name='xmlRelaxNGSetValidErrors' href='html/libxml-relaxng.html#xmlRelaxNGSetValidErrors'/>
<reference name='xmlRelaxNGSetValidStructuredErrors' href='html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors'/>
<reference name='xmlRelaxNGValidCtxt' href='html/libxml-relaxng.html#xmlRelaxNGValidCtxt'/>
<reference name='xmlRelaxNGValidCtxtPtr' href='html/libxml-relaxng.html#xmlRelaxNGValidCtxtPtr'/>
<reference name='xmlRelaxNGValidErr' href='html/libxml-relaxng.html#xmlRelaxNGValidErr'/>
@ -2601,6 +2602,7 @@
<reference name='xmlSchemaSetParserErrors' href='html/libxml-xmlschemas.html#xmlSchemaSetParserErrors'/>
<reference name='xmlSchemaSetValidErrors' href='html/libxml-xmlschemas.html#xmlSchemaSetValidErrors'/>
<reference name='xmlSchemaSetValidOptions' href='html/libxml-xmlschemas.html#xmlSchemaSetValidOptions'/>
<reference name='xmlSchemaSetValidStructuredErrors' href='html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors'/>
<reference name='xmlSchemaType' href='html/libxml-schemasInternals.html#xmlSchemaType'/>
<reference name='xmlSchemaTypeLink' href='html/libxml-schemasInternals.html#xmlSchemaTypeLink'/>
<reference name='xmlSchemaTypeLinkPtr' href='html/libxml-schemasInternals.html#xmlSchemaTypeLinkPtr'/>
@ -5848,6 +5850,7 @@
<ref name='xmlRelaxNGPtr'/>
<ref name='xmlRelaxNGSetParserErrors'/>
<ref name='xmlRelaxNGSetValidErrors'/>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlRelaxNGValidCtxt'/>
<ref name='xmlRelaxNGValidCtxtPtr'/>
<ref name='xmlRelaxNGValidErr'/>
@ -6000,6 +6003,7 @@
<ref name='xmlSchemaSetParserErrors'/>
<ref name='xmlSchemaSetValidErrors'/>
<ref name='xmlSchemaSetValidOptions'/>
<ref name='xmlSchemaSetValidStructuredErrors'/>
<ref name='xmlSchemaType'/>
<ref name='xmlSchemaTypeLink'/>
<ref name='xmlSchemaTypeLinkPtr'/>
@ -8340,6 +8344,7 @@
<ref name='xmlRegNewExecCtxt'/>
<ref name='xmlRelaxNGSetParserErrors'/>
<ref name='xmlRelaxNGSetValidErrors'/>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlRelaxNGValidityErrorFunc'/>
<ref name='xmlRelaxNGValidityWarningFunc'/>
<ref name='xmlSAX2AttributeDecl'/>
@ -8379,6 +8384,7 @@
<ref name='xmlSaveToIO'/>
<ref name='xmlSchemaSetParserErrors'/>
<ref name='xmlSchemaSetValidErrors'/>
<ref name='xmlSchemaSetValidStructuredErrors'/>
<ref name='xmlSchemaValidateStream'/>
<ref name='xmlSchemaValidityErrorFunc'/>
<ref name='xmlSchemaValidityWarningFunc'/>
@ -9515,6 +9521,7 @@
<ref name='xmlRelaxNGFreeValidCtxt'/>
<ref name='xmlRelaxNGGetValidErrors'/>
<ref name='xmlRelaxNGSetValidErrors'/>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlRelaxNGValidateDoc'/>
<ref name='xmlRelaxNGValidateFullElement'/>
<ref name='xmlRelaxNGValidatePopElement'/>
@ -9654,6 +9661,7 @@
<ref name='xmlSchemaSAXPlug'/>
<ref name='xmlSchemaSetValidErrors'/>
<ref name='xmlSchemaSetValidOptions'/>
<ref name='xmlSchemaSetValidStructuredErrors'/>
<ref name='xmlSchemaValidCtxtGetOptions'/>
<ref name='xmlSchemaValidateDoc'/>
<ref name='xmlSchemaValidateFile'/>
@ -9716,6 +9724,8 @@
<ref name='xmlStreamPushAttr'/>
</type>
<type name='xmlStructuredErrorFunc'>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlSchemaSetValidStructuredErrors'/>
<ref name='xmlSetStructuredErrorFunc'/>
<ref name='xmlTextReaderSetStructuredErrorHandler'/>
<ref name='xmlThrDefSetStructuredErrorFunc'/>
@ -11034,6 +11044,7 @@
<ref name='xmlRelaxNGPtr'/>
<ref name='xmlRelaxNGSetParserErrors'/>
<ref name='xmlRelaxNGSetValidErrors'/>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlRelaxNGValidCtxt'/>
<ref name='xmlRelaxNGValidCtxtPtr'/>
<ref name='xmlRelaxNGValidErr'/>
@ -12827,6 +12838,7 @@
<ref name='xmlSchemaSetParserErrors'/>
<ref name='xmlSchemaSetValidErrors'/>
<ref name='xmlSchemaSetValidOptions'/>
<ref name='xmlSchemaSetValidStructuredErrors'/>
<ref name='xmlSchemaValidCtxt'/>
<ref name='xmlSchemaValidCtxtGetOptions'/>
<ref name='xmlSchemaValidCtxtPtr'/>
@ -16472,6 +16484,7 @@
<ref name='xmlRelaxNGParse'/>
<ref name='xmlRelaxNGSetParserErrors'/>
<ref name='xmlRelaxNGSetValidErrors'/>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlRelaxNGValidateDoc'/>
</word>
<word name='RelaxNG'>
@ -16761,38 +16774,6 @@
<word name='Serialize'>
<ref name='xmlAttrSerializeTxtContent'/>
</word>
<word name='Set'>
<ref name='htmlHandleOmittedElem'/>
<ref name='initGenericErrorDefaultFunc'/>
<ref name='setNamespace'/>
<ref name='xlinkSetDefaultDetect'/>
<ref name='xlinkSetDefaultHandler'/>
<ref name='xmlDocSetRootElement'/>
<ref name='xmlInitializePredefinedEntities'/>
<ref name='xmlKeepBlanksDefault'/>
<ref name='xmlLineNumbersDefault'/>
<ref name='xmlNodeSetBase'/>
<ref name='xmlNodeSetLang'/>
<ref name='xmlNodeSetName'/>
<ref name='xmlNodeSetSpacePreserve'/>
<ref name='xmlPedanticParserDefault'/>
<ref name='xmlRelaxNGSetParserErrors'/>
<ref name='xmlRelaxNGSetValidErrors'/>
<ref name='xmlSAXDefaultVersion'/>
<ref name='xmlSaveSetAttrEscape'/>
<ref name='xmlSaveSetEscape'/>
<ref name='xmlSchemaSetParserErrors'/>
<ref name='xmlSchemaSetValidErrors'/>
<ref name='xmlSetBufferAllocationScheme'/>
<ref name='xmlSetEntityReferenceFunc'/>
<ref name='xmlSetNsProp'/>
<ref name='xmlSetProp'/>
<ref name='xmlSubstituteEntitiesDefault'/>
<ref name='xmlTextWriterSetIndent'/>
<ref name='xmlTextWriterSetIndentString'/>
<ref name='xmlXIncludeSetFlags'/>
<ref name='xmlXPtrEvalRangePredicate'/>
</word>
<word name='Sets'>
<ref name='htmlSetMetaEncoding'/>
<ref name='xmlBufferSetAllocationScheme'/>
@ -21902,9 +21883,11 @@
<ref name='xmlRelaxNGGetValidErrors'/>
<ref name='xmlRelaxNGSetParserErrors'/>
<ref name='xmlRelaxNGSetValidErrors'/>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlSchemaGetValidErrors'/>
<ref name='xmlSchemaSetParserErrors'/>
<ref name='xmlSchemaSetValidErrors'/>
<ref name='xmlSchemaSetValidStructuredErrors'/>
<ref name='xmlShellCmd'/>
<ref name='xmlSwitchEncoding'/>
<ref name='xmlSwitchInputEncoding'/>
@ -27409,6 +27392,8 @@
<ref name='xmlSchemaNewStringValue'/>
</word>
<word name='structured'>
<ref name='xmlRelaxNGSetValidStructuredErrors'/>
<ref name='xmlSchemaSetValidStructuredErrors'/>
<ref name='xmlSetStructuredErrorFunc'/>
</word>
<word name='structures'>

View File

@ -8132,6 +8132,18 @@ extern __typeof (xmlRelaxNGSetValidErrors) xmlRelaxNGSetValidErrors__internal_al
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_relaxng
#undef xmlRelaxNGSetValidStructuredErrors
extern __typeof (xmlRelaxNGSetValidStructuredErrors) xmlRelaxNGSetValidStructuredErrors __attribute((alias("xmlRelaxNGSetValidStructuredErrors__internal_alias")));
#else
#ifndef xmlRelaxNGSetValidStructuredErrors
extern __typeof (xmlRelaxNGSetValidStructuredErrors) xmlRelaxNGSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
#define xmlRelaxNGSetValidStructuredErrors xmlRelaxNGSetValidStructuredErrors__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_relaxng
#undef xmlRelaxNGValidateDoc
@ -9238,6 +9250,18 @@ extern __typeof (xmlSchemaIsBuiltInTypeFacet) xmlSchemaIsBuiltInTypeFacet__inter
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlschemas
#undef xmlSchemaIsValid
extern __typeof (xmlSchemaIsValid) xmlSchemaIsValid __attribute((alias("xmlSchemaIsValid__internal_alias")));
#else
#ifndef xmlSchemaIsValid
extern __typeof (xmlSchemaIsValid) xmlSchemaIsValid__internal_alias __attribute((visibility("hidden")));
#define xmlSchemaIsValid xmlSchemaIsValid__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlschemas
#undef xmlSchemaNewDocParserCtxt
@ -9346,6 +9370,30 @@ extern __typeof (xmlSchemaParse) xmlSchemaParse__internal_alias __attribute((vis
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlschemas
#undef xmlSchemaSAXPlug
extern __typeof (xmlSchemaSAXPlug) xmlSchemaSAXPlug __attribute((alias("xmlSchemaSAXPlug__internal_alias")));
#else
#ifndef xmlSchemaSAXPlug
extern __typeof (xmlSchemaSAXPlug) xmlSchemaSAXPlug__internal_alias __attribute((visibility("hidden")));
#define xmlSchemaSAXPlug xmlSchemaSAXPlug__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlschemas
#undef xmlSchemaSAXUnplug
extern __typeof (xmlSchemaSAXUnplug) xmlSchemaSAXUnplug __attribute((alias("xmlSchemaSAXUnplug__internal_alias")));
#else
#ifndef xmlSchemaSAXUnplug
extern __typeof (xmlSchemaSAXUnplug) xmlSchemaSAXUnplug__internal_alias __attribute((visibility("hidden")));
#define xmlSchemaSAXUnplug xmlSchemaSAXUnplug__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlschemas
#undef xmlSchemaSetParserErrors
@ -9382,6 +9430,18 @@ extern __typeof (xmlSchemaSetValidOptions) xmlSchemaSetValidOptions__internal_al
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlschemas
#undef xmlSchemaSetValidStructuredErrors
extern __typeof (xmlSchemaSetValidStructuredErrors) xmlSchemaSetValidStructuredErrors __attribute((alias("xmlSchemaSetValidStructuredErrors__internal_alias")));
#else
#ifndef xmlSchemaSetValidStructuredErrors
extern __typeof (xmlSchemaSetValidStructuredErrors) xmlSchemaSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
#define xmlSchemaSetValidStructuredErrors xmlSchemaSetValidStructuredErrors__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlschemastypes
#undef xmlSchemaValPredefTypeNode
@ -9998,7 +10058,6 @@ extern __typeof (xmlSprintfElementContent) xmlSprintfElementContent__internal_al
#endif
#endif
#if defined(LIBXML_PUSH_ENABLED)
#ifdef bottom_parser
#undef xmlStopParser
extern __typeof (xmlStopParser) xmlStopParser __attribute((alias("xmlStopParser__internal_alias")));
@ -10008,7 +10067,6 @@ extern __typeof (xmlStopParser) xmlStopParser__internal_alias __attribute((visib
#define xmlStopParser xmlStopParser__internal_alias
#endif
#endif
#endif
#ifdef bottom_xmlstring
#undef xmlStrEqual
@ -11056,6 +11114,18 @@ extern __typeof (xmlTextReaderRelaxNGValidate) xmlTextReaderRelaxNGValidate__int
#endif
#endif
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlreader
#undef xmlTextReaderSchemaValidate
extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate __attribute((alias("xmlTextReaderSchemaValidate__internal_alias")));
#else
#ifndef xmlTextReaderSchemaValidate
extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate__internal_alias __attribute((visibility("hidden")));
#define xmlTextReaderSchemaValidate xmlTextReaderSchemaValidate__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_READER_ENABLED)
#ifdef bottom_xmlreader
#undef xmlTextReaderSetErrorHandler
@ -11080,6 +11150,18 @@ extern __typeof (xmlTextReaderSetParserProp) xmlTextReaderSetParserProp__interna
#endif
#endif
#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
#ifdef bottom_xmlreader
#undef xmlTextReaderSetSchema
extern __typeof (xmlTextReaderSetSchema) xmlTextReaderSetSchema __attribute((alias("xmlTextReaderSetSchema__internal_alias")));
#else
#ifndef xmlTextReaderSetSchema
extern __typeof (xmlTextReaderSetSchema) xmlTextReaderSetSchema__internal_alias __attribute((visibility("hidden")));
#define xmlTextReaderSetSchema xmlTextReaderSetSchema__internal_alias
#endif
#endif
#endif
#if defined(LIBXML_READER_ENABLED)
#ifdef bottom_xmlreader
#undef xmlTextReaderSetStructuredErrorHandler
@ -14484,7 +14566,7 @@ extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl__internal_alias
#endif
#endif
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED)
#ifdef bottom_tree
#undef xmlValidateNCName
extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));

View File

@ -595,8 +595,10 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
schannel = xmlStructuredError;
else
channel = xmlGenericError;
if (!data) {
data = xmlGenericErrorContext;
}
}
if (schannel != NULL) {
schannel(data, to);
return;

View File

@ -152,6 +152,9 @@ XMLPUBFUN int XMLCALL
xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn,
void **ctx);
XMLPUBFUN void XMLCALL
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx);
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
XMLPUBFUN void XMLCALL

View File

@ -138,6 +138,9 @@ XMLPUBFUN void XMLCALL
xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn,
void *ctx);
XMLPUBFUN void XMLCALL
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx);
XMLPUBFUN int XMLCALL
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc *err,

View File

@ -10662,6 +10662,26 @@ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
ctxt->userData = ctx;
}
/**
* xmlRelaxNGSetValidStructuredErrors:
* @ctxt: a Relax-NG validation context
* @serror: the structured error function
* @ctx: the functions context
*
* Set the structured error callback
*/
void
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx)
{
if (ctxt == NULL)
return;
ctxt->serror = serror;
ctxt->error = NULL;
ctxt->warning = NULL;
ctxt->userData = ctx;
}
/**
* xmlRelaxNGGetValidErrors:
* @ctxt: a Relax-NG validation context

View File

@ -17336,6 +17336,16 @@ test_xmlRelaxNGSetValidErrors(void) {
}
static int
test_xmlRelaxNGSetValidStructuredErrors(void) {
int test_ret = 0;
/* missing type support */
return(test_ret);
}
static int
test_xmlRelaxNGValidateDoc(void) {
int test_ret = 0;
@ -17613,7 +17623,7 @@ static int
test_relaxng(void) {
int test_ret = 0;
if (quiet == 0) printf("Testing relaxng : 14 of 22 functions ...\n");
if (quiet == 0) printf("Testing relaxng : 14 of 23 functions ...\n");
test_ret += test_xmlRelaxNGDump();
test_ret += test_xmlRelaxNGDumpTree();
test_ret += test_xmlRelaxNGGetParserErrors();
@ -17626,6 +17636,7 @@ test_relaxng(void) {
test_ret += test_xmlRelaxNGParse();
test_ret += test_xmlRelaxNGSetParserErrors();
test_ret += test_xmlRelaxNGSetValidErrors();
test_ret += test_xmlRelaxNGSetValidStructuredErrors();
test_ret += test_xmlRelaxNGValidateDoc();
test_ret += test_xmlRelaxNGValidateFullElement();
test_ret += test_xmlRelaxNGValidatePopElement();
@ -32808,6 +32819,16 @@ test_xmlSchemaSetValidOptions(void) {
}
static int
test_xmlSchemaSetValidStructuredErrors(void) {
int test_ret = 0;
/* missing type support */
return(test_ret);
}
static int
test_xmlSchemaValidCtxtGetOptions(void) {
int test_ret = 0;
@ -33037,7 +33058,7 @@ static int
test_xmlschemas(void) {
int test_ret = 0;
if (quiet == 0) printf("Testing xmlschemas : 14 of 22 functions ...\n");
if (quiet == 0) printf("Testing xmlschemas : 14 of 23 functions ...\n");
test_ret += test_xmlSchemaDump();
test_ret += test_xmlSchemaGetParserErrors();
test_ret += test_xmlSchemaGetValidErrors();
@ -33052,6 +33073,7 @@ test_xmlschemas(void) {
test_ret += test_xmlSchemaSetParserErrors();
test_ret += test_xmlSchemaSetValidErrors();
test_ret += test_xmlSchemaSetValidOptions();
test_ret += test_xmlSchemaSetValidStructuredErrors();
test_ret += test_xmlSchemaValidCtxtGetOptions();
test_ret += test_xmlSchemaValidateDoc();
test_ret += test_xmlSchemaValidateFile();

View File

@ -1430,6 +1430,9 @@ xmlRelaxNGSetParserErrors
xmlRelaxNGSetValidErrors
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlRelaxNGSetValidStructuredErrors
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlRelaxNGValidateDoc
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
@ -1586,6 +1589,9 @@ xmlSchemaInitTypes
xmlSchemaIsBuiltInTypeFacet
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlSchemaIsValid
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlSchemaNewDocParserCtxt
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
@ -1613,6 +1619,12 @@ xmlSchemaNewValidCtxt
xmlSchemaParse
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlSchemaSAXPlug
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlSchemaSAXUnplug
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlSchemaSetParserErrors
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
@ -1622,6 +1634,9 @@ xmlSchemaSetValidErrors
xmlSchemaSetValidOptions
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlSchemaSetValidStructuredErrors
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
xmlSchemaValPredefTypeNode
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
@ -1836,8 +1851,10 @@ xmlTextReaderRelaxNGSetSchema
#ifdef LIBXML_SCHEMAS_ENABLED
xmlTextReaderRelaxNGValidate
#endif
xmlTextReaderSchemaValidate
xmlTextReaderSetErrorHandler
xmlTextReaderSetParserProp
xmlTextReaderSetSchema
xmlTextReaderSetStructuredErrorHandler
xmlTextReaderStandalone
xmlTextReaderValue

View File

@ -3880,6 +3880,66 @@ xmlTextReaderCurrentDoc(xmlTextReaderPtr reader) {
}
#ifdef LIBXML_SCHEMAS_ENABLED
static char *
xmlTextReaderBuildMessage(const char *msg, va_list ap);
static void
xmlTextReaderValidityError(void *ctxt, const char *msg, ...);
static void
xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...);
static void xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...)
{
xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx;
char * str;
va_list ap;
va_start(ap,msg);
str = xmlTextReaderBuildMessage(msg,ap);
if (!reader->errorFunc) {
xmlTextReaderValidityError(ctx, "%s", str);
} else {
reader->errorFunc(reader->errorFuncArg, str, XML_PARSER_SEVERITY_VALIDITY_ERROR, NULL /* locator */);
}
if (str != NULL)
xmlFree(str);
va_end(ap);
}
static void xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...)
{
xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx;
char * str;
va_list ap;
va_start(ap,msg);
str = xmlTextReaderBuildMessage(msg,ap);
if (!reader->errorFunc) {
xmlTextReaderValidityWarning(ctx, "%s", str);
} else {
reader->errorFunc(reader->errorFuncArg, str, XML_PARSER_SEVERITY_VALIDITY_WARNING, NULL /* locator */);
}
if (str != NULL)
xmlFree(str);
va_end(ap);
}
static void
xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error);
static void xmlTextReaderValidityStructuredRelay(void * userData, xmlErrorPtr error)
{
xmlTextReaderPtr reader = (xmlTextReaderPtr) userData;
if (reader->sErrorFunc) {
reader->sErrorFunc(reader->errorFuncArg, error);
} else {
xmlTextReaderStructuredError(reader, error);
}
}
/**
* xmlTextReaderRelaxNGSetSchema:
* @reader: the xmlTextReaderPtr used
@ -3924,9 +3984,14 @@ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema) {
return(-1);
if (reader->errorFunc != NULL) {
xmlRelaxNGSetValidErrors(reader->rngValidCtxt,
(xmlRelaxNGValidityErrorFunc)reader->errorFunc,
(xmlRelaxNGValidityWarningFunc) reader->errorFunc,
reader->errorFuncArg);
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
}
if (reader->sErrorFunc != NULL) {
xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
xmlTextReaderValidityStructuredRelay,
reader);
}
reader->rngValidErrors = 0;
reader->rngFullNode = NULL;
@ -3999,9 +4064,14 @@ xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) {
}
if (reader->errorFunc != NULL) {
xmlSchemaSetValidErrors(reader->xsdValidCtxt,
(xmlSchemaValidityErrorFunc)reader->errorFunc,
(xmlSchemaValidityWarningFunc) reader->errorFunc,
reader->errorFuncArg);
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
}
if (reader->sErrorFunc != NULL) {
xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt,
xmlTextReaderValidityStructuredRelay,
reader);
}
reader->xsdValidErrors = 0;
reader->validate = XML_TEXTREADER_VALIDATE_XSD;
@ -4051,9 +4121,14 @@ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng) {
ctxt = xmlRelaxNGNewParserCtxt(rng);
if (reader->errorFunc != NULL) {
xmlRelaxNGSetParserErrors(ctxt,
(xmlRelaxNGValidityErrorFunc) reader->errorFunc,
(xmlRelaxNGValidityWarningFunc) reader->errorFunc,
reader->errorFuncArg);
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
}
if (reader->sErrorFunc != NULL) {
xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
xmlTextReaderValidityStructuredRelay,
reader);
}
reader->rngSchemas = xmlRelaxNGParse(ctxt);
xmlRelaxNGFreeParserCtxt(ctxt);
@ -4067,9 +4142,14 @@ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng) {
}
if (reader->errorFunc != NULL) {
xmlRelaxNGSetValidErrors(reader->rngValidCtxt,
(xmlRelaxNGValidityErrorFunc)reader->errorFunc,
(xmlRelaxNGValidityWarningFunc) reader->errorFunc,
reader->errorFuncArg);
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
}
if (reader->sErrorFunc != NULL) {
xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
xmlTextReaderValidityStructuredRelay,
reader);
}
reader->rngValidErrors = 0;
reader->rngFullNode = NULL;
@ -4129,9 +4209,9 @@ xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) {
ctxt = xmlSchemaNewParserCtxt(xsd);
if (reader->errorFunc != NULL) {
xmlSchemaSetParserErrors(ctxt,
(xmlSchemaValidityErrorFunc) reader->errorFunc,
(xmlSchemaValidityWarningFunc) reader->errorFunc,
reader->errorFuncArg);
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
}
reader->xsdSchemas = xmlSchemaParse(ctxt);
xmlSchemaFreeParserCtxt(ctxt);
@ -4155,9 +4235,14 @@ xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd) {
}
if (reader->errorFunc != NULL) {
xmlSchemaSetValidErrors(reader->xsdValidCtxt,
(xmlSchemaValidityErrorFunc)reader->errorFunc,
(xmlSchemaValidityWarningFunc) reader->errorFunc,
reader->errorFuncArg);
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
}
if (reader->sErrorFunc != NULL) {
xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt,
xmlTextReaderValidityStructuredRelay,
reader);
}
reader->xsdValidErrors = 0;
reader->validate = XML_TEXTREADER_VALIDATE_XSD;
@ -4467,6 +4552,22 @@ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
reader->errorFunc = f;
reader->sErrorFunc = NULL;
reader->errorFuncArg = arg;
#ifdef LIBXML_SCHEMAS_ENABLED
if (reader->rngValidCtxt) {
xmlRelaxNGSetValidErrors(reader->rngValidCtxt,
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, reader);
}
if (reader->xsdValidCtxt) {
xmlSchemaSetValidErrors(reader->xsdValidCtxt,
xmlTextReaderValidityErrorRelay,
xmlTextReaderValidityWarningRelay,
reader);
xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, reader);
}
#endif
}
else {
/* restore defaults */
@ -4477,6 +4578,16 @@ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
reader->errorFunc = NULL;
reader->sErrorFunc = NULL;
reader->errorFuncArg = NULL;
#ifdef LIBXML_SCHEMAS_ENABLED
if (reader->rngValidCtxt) {
xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, reader);
xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, reader);
}
if (reader->xsdValidCtxt) {
xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, reader);
xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, reader);
}
#endif
}
}
@ -4503,6 +4614,20 @@ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
reader->sErrorFunc = f;
reader->errorFunc = NULL;
reader->errorFuncArg = arg;
#ifdef LIBXML_SCHEMAS_ENABLED
if (reader->rngValidCtxt) {
xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, reader);
xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
xmlTextReaderValidityStructuredRelay,
reader);
}
if (reader->xsdValidCtxt) {
xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, reader);
xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt,
xmlTextReaderValidityStructuredRelay,
reader);
}
#endif
}
else {
/* restore defaults */
@ -4514,6 +4639,16 @@ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
reader->errorFunc = NULL;
reader->sErrorFunc = NULL;
reader->errorFuncArg = NULL;
#ifdef LIBXML_SCHEMAS_ENABLED
if (reader->rngValidCtxt) {
xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL, reader);
xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL, reader);
}
if (reader->xsdValidCtxt) {
xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL, reader);
xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL, reader);
}
#endif
}
}

View File

@ -23647,6 +23647,26 @@ xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt,
xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx);
}
/**
* xmlSchemaSetValidStructuredErrors:
* @ctxt: a schema validation context
* @serror: the structured error function
* @ctx: the functions context
*
* Set the structured error callback
*/
void
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx)
{
if (ctxt == NULL)
return;
ctxt->serror = serror;
ctxt->error = NULL;
ctxt->warning = NULL;
ctxt->userData = ctx;
}
/**
* xmlSchemaGetValidErrors:
* @ctxt: a XML-Schema validation context