Home | History | Annotate | Download | only in libxml2

Lines Matching refs:NULL

48    ((node != NULL) && (node->type == XML_ELEMENT_NODE ) &&		\
49 (node->ns != NULL) && \
55 while (node != NULL) { \
56 if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) && \
229 if (ctxt != NULL)
231 __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, node, NULL,
250 xmlGenericErrorFunc channel = NULL;
251 xmlStructuredErrorFunc schannel = NULL;
252 void *data = NULL;
254 if (ctxt != NULL) {
261 error, XML_ERR_ERROR, NULL, 0,
262 (const char *) str1, (const char *) str2, NULL, 0, 0,
277 if (ctxt != NULL) {
281 __xmlSimpleError(XML_FROM_SCHEMASV, XML_ERR_NO_MEMORY, node, NULL,
302 * Returns the new pointer or NULL in case of error
313 if ((ctxt == NULL) || (rule == NULL) || (node == NULL) ||
314 (test == NULL))
315 return(NULL);
321 if (comp == NULL) {
325 test, NULL);
326 return(NULL);
330 if (ret == NULL) {
332 return (NULL);
340 ret->next = NULL;
341 if (rule->tests == NULL) {
346 while (prev->next != NULL)
363 while (tests != NULL) {
365 if (tests->test != NULL)
367 if (tests->comp != NULL)
369 if (tests->report != NULL)
386 * Returns the new pointer or NULL in case of error
396 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
397 (context == NULL))
398 return(NULL);
405 if (pattern == NULL) {
409 context, NULL);
413 if (ret == NULL) {
415 return (NULL);
422 ret->next = NULL;
423 if (schema->rules == NULL) {
428 while (prev->next != NULL)
432 ret->patnext = NULL;
433 if (pat->rules == NULL) {
438 while (prev->patnext != NULL)
455 while (rules != NULL) {
459 if (rules->context != NULL)
463 if (rules->report != NULL)
479 * Returns the new pointer or NULL in case of error
487 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) || (name == NULL))
488 return(NULL);
491 if (ret == NULL) {
493 return (NULL);
497 ret->next = NULL;
498 if (schema->patterns == NULL) {
503 while (prev->next != NULL)
520 while (patterns != NULL) {
522 if (patterns->name != NULL)
535 * Returns the newly allocated structure or NULL in case or error
543 if (ret == NULL) {
544 xmlSchematronPErrMemory(ctxt, "allocating schema", NULL);
545 return (NULL);
563 if (schema == NULL)
566 if ((schema->doc != NULL) && (!(schema->preserve)))
569 if (schema->namespaces != NULL)
585 * Returns the parser context or NULL in case of error
592 if (URL == NULL)
593 return (NULL);
598 if (ret == NULL) {
599 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
600 NULL);
601 return (NULL);
607 ret->includes = NULL;
608 ret->xctxt = xmlXPathNewContext(NULL);
609 if (ret->xctxt == NULL) {
610 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
611 NULL);
613 return (NULL);
627 * Returns the parser context or NULL in case of error
634 if ((buffer == NULL) || (size <= 0))
635 return (NULL);
640 if (ret == NULL) {
641 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
642 NULL);
643 return (NULL);
649 ret->xctxt = xmlXPathNewContext(NULL);
650 if (ret->xctxt == NULL) {
651 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
652 NULL);
654 return (NULL);
666 * Returns the parser context or NULL in case of error
673 if (doc == NULL)
674 return (NULL);
679 if (ret == NULL) {
680 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
681 NULL);
682 return (NULL);
690 if (ret->xctxt == NULL) {
691 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
692 NULL);
694 return (NULL);
709 if (ctxt == NULL)
711 if (ctxt->doc != NULL && !ctxt->preserve)
713 if (ctxt->xctxt != NULL) {
716 if (ctxt->namespaces != NULL)
735 if (ctxt->includes == NULL) {
739 if (ctxt->includes == NULL) {
740 xmlSchematronPErrMemory(NULL, "allocating parser includes",
741 NULL);
751 if (tmp == NULL) {
752 xmlSchematronPErrMemory(NULL, "allocating parser includes",
753 NULL);
770 * Returns the node immediately following the include or NULL if the
780 return(NULL);
785 if (ret != NULL)
787 if (ret == NULL)
805 if (ctxt->namespaces == NULL) {
809 if (ctxt->namespaces == NULL) {
810 xmlSchematronPErrMemory(NULL, "allocating parser namespaces",
811 NULL);
821 if (tmp == NULL) {
822 xmlSchematronPErrMemory(NULL, "allocating parser namespaces",
823 NULL);
834 ctxt->namespaces[2 * ctxt->nbNamespaces] = NULL;
835 ctxt->namespaces[2 * ctxt->nbNamespaces + 1] = NULL;
859 if ((ctxt == NULL) || (rule == NULL)) return;
862 if (context == NULL) {
866 NULL, NULL);
872 NULL, NULL);
877 rule, context, NULL);
878 if (ruleptr == NULL) {
886 while (cur != NULL) {
890 if (test == NULL) {
894 NULL, NULL);
899 NULL, NULL);
907 if (testptr == NULL)
913 if (test == NULL) {
917 NULL, NULL);
922 NULL, NULL);
930 if (testptr == NULL)
937 cur->name, NULL);
945 "rule has no assert nor report element", NULL, NULL);
964 if ((ctxt == NULL) || (pat == NULL)) return;
967 if (id == NULL) {
971 if (pattern == NULL) {
972 if (id != NULL)
978 while (cur != NULL) {
985 "Expecting a rule element instead of %s", cur->name, NULL);
993 "Pattern has no rule element", NULL, NULL);
1010 xmlNodePtr ret = NULL;
1011 xmlDocPtr doc = NULL;
1012 xmlChar *href = NULL;
1013 xmlChar *base = NULL;
1014 xmlChar *URI = NULL;
1016 if ((ctxt == NULL) || (cur == NULL))
1017 return(NULL);
1020 if (href == NULL) {
1023 "Include has no href attribute", NULL, NULL);
1030 doc = xmlReadFile((const char *) URI, NULL, SCHEMATRON_PARSE_OPTIONS);
1031 if (doc == NULL) {
1035 URI, NULL);
1039 if (ret == NULL) {
1043 URI, NULL);
1051 if (ret == NULL) {
1052 if (doc != NULL)
1056 if (base != NULL)
1058 if (URI != NULL)
1072 * NULL in case of error
1077 xmlSchematronPtr ret = NULL;
1082 if (ctxt == NULL)
1083 return (NULL);
1090 if (ctxt->URL != NULL) {
1091 doc = xmlReadFile((const char *) ctxt->URL, NULL,
1093 if (doc == NULL) {
1094 xmlSchematronPErr(ctxt, NULL,
1097 ctxt->URL, NULL);
1098 return (NULL);
1101 } else if (ctxt->buffer != NULL) {
1102 doc = xmlReadMemory(ctxt->buffer, ctxt->size, NULL, NULL,
1104 if (doc == NULL) {
1105 xmlSchematronPErr(ctxt, NULL,
1108 NULL, NULL);
1109 return (NULL);
1114 } else if (ctxt->doc != NULL) {
1119 xmlSchematronPErr(ctxt, NULL,
1122 NULL, NULL);
1123 return (NULL);
1130 if (root == NULL) {
1133 "The schema has no document element.\n", NULL, NULL);
1137 return (NULL);
1144 ctxt->URL, NULL);
1148 if (ret == NULL)
1159 if (title != NULL) {
1169 if ((uri == NULL) || (uri[0] == 0)) {
1172 "ns element has no uri", NULL, NULL);
1174 if ((prefix == NULL) || (prefix[0] == 0)) {
1177 "ns element has no prefix", NULL, NULL);
1191 while (cur != NULL) {
1198 "Expecting a pattern element instead of %s", cur->name, NULL);
1207 ctxt->URL, NULL);
1221 if (ret != NULL) {
1224 ret = NULL;
1228 ctxt->namespaces = NULL;
1243 xmlNodePtr node = NULL;
1246 if ((ctxt == NULL) || (cur == NULL) || (xpath == NULL))
1247 return(NULL);
1252 if (ret == NULL)
1253 return(NULL);
1256 (ret->nodesetval != NULL) && (ret->nodesetval->nodeNr > 0))
1287 * Returns a report string or NULL in case of error. The string needs
1293 xmlChar *ret = NULL;
1296 if ((test == NULL) || (cur == NULL))
1300 while (child != NULL) {
1310 if (path != NULL) {
1312 if (node == NULL)
1317 if ((node->ns == NULL) || (node->ns->prefix == NULL))
1332 if (ret != NULL) {
1370 if ((ctxt == NULL) || (cur == NULL) || (test == NULL))
1383 const xmlChar *report = NULL;
1390 if (path == NULL)
1393 if ((test->report != NULL) && (test->report[0] != 0))
1396 if (test->node != NULL)
1398 if (report == NULL) {
1409 xmlStructuredErrorFunc schannel = NULL;
1410 xmlGenericErrorFunc channel = NULL;
1411 void *data = NULL;
1413 if (ctxt != NULL) {
1414 if (ctxt->serror != NULL)
1422 NULL, cur, XML_FROM_SCHEMATRONV,
1424 XML_ERR_ERROR, NULL, line,
1425 (pattern == NULL)?NULL:((const char *) pattern->name),
1435 if ((path != NULL) && (path != (xmlChar *) cur->name))
1450 if ((ctxt == NULL) || (pattern == NULL))
1459 if (pattern->name == NULL)
1462 xmlSchematronReportOutput(ctxt, NULL, &msg[0]);
1485 if (ctxt == NULL)
1488 ctxt->error = NULL;
1489 ctxt->warning = NULL;
1500 * Returns the validation context or NULL in case of error
1509 if (ret == NULL) {
1510 xmlSchematronVErrMemory(NULL, "allocating validation context",
1511 NULL);
1512 return (NULL);
1517 ret->xctxt = xmlXPathNewContext(NULL);
1519 if (ret->xctxt == NULL) {
1520 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
1521 NULL);
1523 return (NULL);
1526 if ((schema->namespaces[2 * i] == NULL) ||
1527 (schema->namespaces[2 * i + 1] == NULL))
1544 if (ctxt == NULL)
1546 if (ctxt->xctxt != NULL)
1548 if (ctxt->dict != NULL)
1555 if (cur->children != NULL) {
1569 while (cur->next != NULL) {
1578 if (cur == NULL) break;
1579 if (cur->type == XML_DOCUMENT_NODE) return(NULL);
1580 if (cur->next != NULL) {
1584 } while (cur != NULL);
1610 if (ret == NULL) {
1616 if ((ret->nodesetval == NULL) ||
1629 if ((ret->stringval == NULL) ||
1671 if ((ctxt == NULL) || (ctxt->schema == NULL) ||
1672 (ctxt->schema->rules == NULL) || (instance == NULL))
1676 if (root == NULL) {
1688 while (cur != NULL) {
1690 while (rule != NULL) {
1693 while (test != NULL) {
1709 while (pattern != NULL) {
1719 while (cur != NULL) {
1721 while (rule != NULL) {
1724 while (test != NULL) {
1748 xmlSchematronPtr schema = NULL;
1751 if (pctxt == NULL) {
1755 if (schema == NULL) {
1760 instance = xmlReadFile("tst.sct", NULL,
1762 if (instance == NULL) {
1765 if ((schema != NULL) && (instance != NULL)) {
1767 if (vctxt == NULL) {