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) && \
231 if (ctxt != NULL)
233 __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, node, NULL,
252 xmlGenericErrorFunc channel = NULL;
253 xmlStructuredErrorFunc schannel = NULL;
254 void *data = NULL;
256 if (ctxt != NULL) {
263 error, XML_ERR_ERROR, NULL, 0,
264 (const char *) str1, (const char *) str2, NULL, 0, 0,
279 if (ctxt != NULL) {
283 __xmlSimpleError(XML_FROM_SCHEMASV, XML_ERR_NO_MEMORY, node, NULL,
304 * Returns the new pointer or NULL in case of error
315 if ((ctxt == NULL) || (rule == NULL) || (node == NULL) ||
316 (test == NULL))
317 return(NULL);
323 if (comp == NULL) {
327 test, NULL);
328 return(NULL);
332 if (ret == NULL) {
334 return (NULL);
342 ret->next = NULL;
343 if (rule->tests == NULL) {
348 while (prev->next != NULL)
365 while (tests != NULL) {
367 if (tests->test != NULL)
369 if (tests->comp != NULL)
371 if (tests->report != NULL)
388 * Returns the new pointer or NULL in case of error
398 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
399 (context == NULL))
400 return(NULL);
407 if (pattern == NULL) {
411 context, NULL);
415 if (ret == NULL) {
417 return (NULL);
424 ret->next = NULL;
425 if (schema->rules == NULL) {
430 while (prev->next != NULL)
434 ret->patnext = NULL;
435 if (pat->rules == NULL) {
440 while (prev->patnext != NULL)
457 while (rules != NULL) {
461 if (rules->context != NULL)
465 if (rules->report != NULL)
481 * Returns the new pointer or NULL in case of error
489 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) || (name == NULL))
490 return(NULL);
493 if (ret == NULL) {
495 return (NULL);
499 ret->next = NULL;
500 if (schema->patterns == NULL) {
505 while (prev->next != NULL)
522 while (patterns != NULL) {
524 if (patterns->name != NULL)
537 * Returns the newly allocated structure or NULL in case or error
545 if (ret == NULL) {
546 xmlSchematronPErrMemory(ctxt, "allocating schema", NULL);
547 return (NULL);
565 if (schema == NULL)
568 if ((schema->doc != NULL) && (!(schema->preserve)))
571 if (schema->namespaces != NULL)
587 * Returns the parser context or NULL in case of error
594 if (URL == NULL)
595 return (NULL);
600 if (ret == NULL) {
601 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
602 NULL);
603 return (NULL);
609 ret->includes = NULL;
610 ret->xctxt = xmlXPathNewContext(NULL);
611 if (ret->xctxt == NULL) {
612 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
613 NULL);
615 return (NULL);
629 * Returns the parser context or NULL in case of error
636 if ((buffer == NULL) || (size <= 0))
637 return (NULL);
642 if (ret == NULL) {
643 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
644 NULL);
645 return (NULL);
651 ret->xctxt = xmlXPathNewContext(NULL);
652 if (ret->xctxt == NULL) {
653 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
654 NULL);
656 return (NULL);
668 * Returns the parser context or NULL in case of error
675 if (doc == NULL)
676 return (NULL);
681 if (ret == NULL) {
682 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
683 NULL);
684 return (NULL);
692 if (ret->xctxt == NULL) {
693 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
694 NULL);
696 return (NULL);
711 if (ctxt == NULL)
713 if (ctxt->doc != NULL && !ctxt->preserve)
715 if (ctxt->xctxt != NULL) {
718 if (ctxt->namespaces != NULL)
737 if (ctxt->includes == NULL) {
741 if (ctxt->includes == NULL) {
742 xmlSchematronPErrMemory(NULL, "allocating parser includes",
743 NULL);
753 if (tmp == NULL) {
754 xmlSchematronPErrMemory(NULL, "allocating parser includes",
755 NULL);
772 * Returns the node immediately following the include or NULL if the
782 return(NULL);
787 if (ret != NULL)
789 if (ret == NULL)
807 if (ctxt->namespaces == NULL) {
811 if (ctxt->namespaces == NULL) {
812 xmlSchematronPErrMemory(NULL, "allocating parser namespaces",
813 NULL);
823 if (tmp == NULL) {
824 xmlSchematronPErrMemory(NULL, "allocating parser namespaces",
825 NULL);
836 ctxt->namespaces[2 * ctxt->nbNamespaces] = NULL;
837 ctxt->namespaces[2 * ctxt->nbNamespaces + 1] = NULL;
861 if ((ctxt == NULL) || (rule == NULL)) return;
864 if (context == NULL) {
868 NULL, NULL);
874 NULL, NULL);
879 rule, context, NULL);
880 if (ruleptr == NULL) {
888 while (cur != NULL) {
892 if (test == NULL) {
896 NULL, NULL);
901 NULL, NULL);
909 if (testptr == NULL)
915 if (test == NULL) {
919 NULL, NULL);
924 NULL, NULL);
932 if (testptr == NULL)
939 cur->name, NULL);
947 "rule has no assert nor report element", NULL, NULL);
966 if ((ctxt == NULL) || (pat == NULL)) return;
969 if (id == NULL) {
973 if (pattern == NULL) {
974 if (id != NULL)
980 while (cur != NULL) {
987 "Expecting a rule element instead of %s", cur->name, NULL);
995 "Pattern has no rule element", NULL, NULL);
1012 xmlNodePtr ret = NULL;
1013 xmlDocPtr doc = NULL;
1014 xmlChar *href = NULL;
1015 xmlChar *base = NULL;
1016 xmlChar *URI = NULL;
1018 if ((ctxt == NULL) || (cur == NULL))
1019 return(NULL);
1022 if (href == NULL) {
1025 "Include has no href attribute", NULL, NULL);
1032 doc = xmlReadFile((const char *) URI, NULL, SCHEMATRON_PARSE_OPTIONS);
1033 if (doc == NULL) {
1037 URI, NULL);
1041 if (ret == NULL) {
1045 URI, NULL);
1053 if (ret == NULL) {
1054 if (doc != NULL)
1058 if (base != NULL)
1060 if (URI != NULL)
1074 * NULL in case of error
1079 xmlSchematronPtr ret = NULL;
1084 if (ctxt == NULL)
1085 return (NULL);
1092 if (ctxt->URL != NULL) {
1093 doc = xmlReadFile((const char *) ctxt->URL, NULL,
1095 if (doc == NULL) {
1096 xmlSchematronPErr(ctxt, NULL,
1099 ctxt->URL, NULL);
1100 return (NULL);
1103 } else if (ctxt->buffer != NULL) {
1104 doc = xmlReadMemory(ctxt->buffer, ctxt->size, NULL, NULL,
1106 if (doc == NULL) {
1107 xmlSchematronPErr(ctxt, NULL,
1110 NULL, NULL);
1111 return (NULL);
1116 } else if (ctxt->doc != NULL) {
1121 xmlSchematronPErr(ctxt, NULL,
1124 NULL, NULL);
1125 return (NULL);
1132 if (root == NULL) {
1135 "The schema has no document element.\n", NULL, NULL);
1139 return (NULL);
1146 ctxt->URL, NULL);
1150 if (ret == NULL)
1161 if (title != NULL) {
1171 if ((uri == NULL) || (uri[0] == 0)) {
1174 "ns element has no uri", NULL, NULL);
1176 if ((prefix == NULL) || (prefix[0] == 0)) {
1179 "ns element has no prefix", NULL, NULL);
1193 while (cur != NULL) {
1200 "Expecting a pattern element instead of %s", cur->name, NULL);
1209 ctxt->URL, NULL);
1223 if (ret != NULL) {
1226 ret = NULL;
1230 ctxt->namespaces = NULL;
1245 xmlNodePtr node = NULL;
1248 if ((ctxt == NULL) || (cur == NULL) || (xpath == NULL))
1249 return(NULL);
1254 if (ret == NULL)
1255 return(NULL);
1258 (ret->nodesetval != NULL) && (ret->nodesetval->nodeNr > 0))
1289 * Returns a report string or NULL in case of error. The string needs
1295 xmlChar *ret = NULL;
1298 if ((test == NULL) || (cur == NULL))
1302 while (child != NULL) {
1312 if (path != NULL) {
1314 if (node == NULL)
1319 if ((node->ns == NULL) || (node->ns->prefix == NULL))
1334 if (ret != NULL) {
1372 if ((ctxt == NULL) || (cur == NULL) || (test == NULL))
1385 const xmlChar *report = NULL;
1392 if (path == NULL)
1395 if ((test->report != NULL) && (test->report[0] != 0))
1398 if (test->node != NULL)
1400 if (report == NULL) {
1411 xmlStructuredErrorFunc schannel = NULL;
1412 xmlGenericErrorFunc channel = NULL;
1413 void *data = NULL;
1415 if (ctxt != NULL) {
1416 if (ctxt->serror != NULL)
1424 NULL, cur, XML_FROM_SCHEMATRONV,
1426 XML_ERR_ERROR, NULL, line,
1427 (pattern == NULL)?NULL:((const char *) pattern->name),
1437 if ((path != NULL) && (path != (xmlChar *) cur->name))
1452 if ((ctxt == NULL) || (pattern == NULL))
1461 if (pattern->name == NULL)
1464 xmlSchematronReportOutput(ctxt, NULL, &msg[0]);
1487 if (ctxt == NULL)
1490 ctxt->error = NULL;
1491 ctxt->warning = NULL;
1502 * Returns the validation context or NULL in case of error
1511 if (ret == NULL) {
1512 xmlSchematronVErrMemory(NULL, "allocating validation context",
1513 NULL);
1514 return (NULL);
1519 ret->xctxt = xmlXPathNewContext(NULL);
1521 if (ret->xctxt == NULL) {
1522 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
1523 NULL);
1525 return (NULL);
1528 if ((schema->namespaces[2 * i] == NULL) ||
1529 (schema->namespaces[2 * i + 1] == NULL))
1546 if (ctxt == NULL)
1548 if (ctxt->xctxt != NULL)
1550 if (ctxt->dict != NULL)
1557 if (cur->children != NULL) {
1571 while (cur->next != NULL) {
1580 if (cur == NULL) break;
1581 if (cur->type == XML_DOCUMENT_NODE) return(NULL);
1582 if (cur->next != NULL) {
1586 } while (cur != NULL);
1612 if (ret == NULL) {
1618 if ((ret->nodesetval == NULL) ||
1631 if ((ret->stringval == NULL) ||
1673 if ((ctxt == NULL) || (ctxt->schema == NULL) ||
1674 (ctxt->schema->rules == NULL) || (instance == NULL))
1678 if (root == NULL) {
1690 while (cur != NULL) {
1692 while (rule != NULL) {
1695 while (test != NULL) {
1711 while (pattern != NULL) {
1721 while (cur != NULL) {
1723 while (rule != NULL) {
1726 while (test != NULL) {
1750 xmlSchematronPtr schema = NULL;
1753 if (pctxt == NULL) {
1757 if (schema == NULL) {
1762 instance = xmlReadFile("tst.sct", NULL,
1764 if (instance == NULL) {
1767 if ((schema != NULL) && (instance != NULL)) {
1769 if (vctxt == NULL) {