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

Function xmlValidateDocumentFinal

ThirdParty/libxml2/vtklibxml2/valid.c:6411–6453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6409 */
6410
6411int
6412xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
6413 xmlRefTablePtr table;
6414 xmlParserCtxtPtr pctxt = NULL;
6415 xmlParserInputPtr oldInput = NULL;
6416
6417 if (ctxt == NULL)
6418 return(0);
6419 if (doc == NULL) {
6420 xmlErrValid(ctxt, XML_DTD_NO_DOC,
6421 "xmlValidateDocumentFinal: doc == NULL\n", NULL);
6422 return(0);
6423 }
6424
6425 /*
6426 * Check all the NOTATION/NOTATIONS attributes
6427 */
6428 /*
6429 * Check all the ENTITY/ENTITIES attributes definition for validity
6430 */
6431 /*
6432 * Check all the IDREF/IDREFS attributes definition for validity
6433 */
6434
6435 /*
6436 * Don't print line numbers.
6437 */
6438 if (ctxt->flags & XML_VCTXT_USE_PCTXT) {
6439 pctxt = ctxt->userData;
6440 oldInput = pctxt->input;
6441 pctxt->input = NULL;
6442 }
6443
6444 table = (xmlRefTablePtr) doc->refs;
6445 ctxt->doc = doc;
6446 ctxt->valid = 1;
6447 xmlHashScan(table, xmlValidateCheckRefCallback, ctxt);
6448
6449 if (ctxt->flags & XML_VCTXT_USE_PCTXT)
6450 pctxt->input = oldInput;
6451
6452 return(ctxt->valid);
6453}
6454
6455/**
6456 * xmlValidateDtd:

Callers 4

xmlValidateDtdFunction · 0.85
xmlValidateDocumentFunction · 0.85
xmlSAX2EndDocumentFunction · 0.85

Calls 1

xmlHashScanFunction · 0.85

Tested by

no test coverage detected