MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlRelaxNGValidateDoc

Function xmlRelaxNGValidateDoc

ThirdParty/libxml2/vtklibxml2/relaxng.c:10815–10837  ·  view source on GitHub ↗

* xmlRelaxNGValidateDoc: * @ctxt: a Relax-NG validation context * @doc: a parsed document tree * * Validate a document tree in memory. * * Returns 0 if the document is valid, a positive error code * number otherwise and -1 in case of internal or API error. */

Source from the content-addressed store, hash-verified

10813 * number otherwise and -1 in case of internal or API error.
10814 */
10815int
10816xmlRelaxNGValidateDoc(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc)
10817{
10818 int ret;
10819
10820 if ((ctxt == NULL) || (doc == NULL))
10821 return (-1);
10822
10823 ctxt->doc = doc;
10824
10825 ret = xmlRelaxNGValidateDocument(ctxt, doc);
10826 /*
10827 * Remove all left PSVI
10828 */
10829 xmlRelaxNGCleanPSVI((xmlNodePtr) doc);
10830
10831 /*
10832 * TODO: build error codes
10833 */
10834 if (ret == -1)
10835 return (1);
10836 return (ret);
10837}
10838
10839#endif /* LIBXML_SCHEMAS_ENABLED */

Callers 4

parseAndPrintFileFunction · 0.85
rngOneTestFunction · 0.85
xmlShellRNGValidateFunction · 0.85
xsdTestCaseFunction · 0.85

Calls 2

xmlRelaxNGCleanPSVIFunction · 0.85

Tested by 1

rngOneTestFunction · 0.68