OLD | NEW |
1 /* | 1 /* |
2 * xpath.c: XML Path Language implementation | 2 * xpath.c: XML Path Language implementation |
3 * XPath is a language for addressing parts of an XML document, | 3 * XPath is a language for addressing parts of an XML document, |
4 * designed to be used by both XSLT and XPointer | 4 * designed to be used by both XSLT and XPointer |
5 *f | 5 *f |
6 * Reference: W3C Recommendation 16 November 1999 | 6 * Reference: W3C Recommendation 16 November 1999 |
7 * http://www.w3.org/TR/1999/REC-xpath-19991116 | 7 * http://www.w3.org/TR/1999/REC-xpath-19991116 |
8 * Public reference: | 8 * Public reference: |
9 * http://www.w3.org/TR/xpath | 9 * http://www.w3.org/TR/xpath |
10 * | 10 * |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 * Handle a redefinition of attribute error | 632 * Handle a redefinition of attribute error |
633 */ | 633 */ |
634 static void | 634 static void |
635 xmlXPathErrMemory(xmlXPathContextPtr ctxt, const char *extra) | 635 xmlXPathErrMemory(xmlXPathContextPtr ctxt, const char *extra) |
636 { | 636 { |
637 if (ctxt != NULL) { | 637 if (ctxt != NULL) { |
638 if (extra) { | 638 if (extra) { |
639 xmlChar buf[200]; | 639 xmlChar buf[200]; |
640 | 640 |
641 xmlStrPrintf(buf, 200, | 641 xmlStrPrintf(buf, 200, |
642 BAD_CAST "Memory allocation failed : %s\n", | 642 "Memory allocation failed : %s\n", |
643 extra); | 643 extra); |
644 ctxt->lastError.message = (char *) xmlStrdup(buf); | 644 ctxt->lastError.message = (char *) xmlStrdup(buf); |
645 } else { | 645 } else { |
646 ctxt->lastError.message = (char *) | 646 ctxt->lastError.message = (char *) |
647 xmlStrdup(BAD_CAST "Memory allocation failed\n"); | 647 xmlStrdup(BAD_CAST "Memory allocation failed\n"); |
648 } | 648 } |
649 ctxt->lastError.domain = XML_FROM_XPATH; | 649 ctxt->lastError.domain = XML_FROM_XPATH; |
650 ctxt->lastError.code = XML_ERR_NO_MEMORY; | 650 ctxt->lastError.code = XML_ERR_NO_MEMORY; |
651 if (ctxt->error != NULL) | 651 if (ctxt->error != NULL) |
652 ctxt->error(ctxt->userData, &ctxt->lastError); | 652 ctxt->error(ctxt->userData, &ctxt->lastError); |
(...skipping 14730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15383 xmlXPathTranslateFunction); | 15383 xmlXPathTranslateFunction); |
15384 | 15384 |
15385 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri", | 15385 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri", |
15386 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions", | 15386 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions", |
15387 xmlXPathEscapeUriFunction); | 15387 xmlXPathEscapeUriFunction); |
15388 } | 15388 } |
15389 | 15389 |
15390 #endif /* LIBXML_XPATH_ENABLED */ | 15390 #endif /* LIBXML_XPATH_ENABLED */ |
15391 #define bottom_xpath | 15391 #define bottom_xpath |
15392 #include "elfgcchack.h" | 15392 #include "elfgcchack.h" |
OLD | NEW |