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