Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: third_party/libxml/src/xpath.c

Issue 7747031: Apply libxml fix for undefined namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13333 matching lines...) Expand 10 before | Expand all | Expand 10 after
13344 } 13344 }
13345 valuePush(ctxt, val); 13345 valuePush(ctxt, val);
13346 } else { 13346 } else {
13347 const xmlChar *URI; 13347 const xmlChar *URI;
13348 13348
13349 URI = xmlXPathNsLookup(ctxt->context, op->value5); 13349 URI = xmlXPathNsLookup(ctxt->context, op->value5);
13350 if (URI == NULL) { 13350 if (URI == NULL) {
13351 xmlGenericError(xmlGenericErrorContext, 13351 xmlGenericError(xmlGenericErrorContext,
13352 "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n", 13352 "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n",
13353 (char *) op->value4, (char *)op->value5); 13353 (char *) op->value4, (char *)op->value5);
13354 ctxt->error = XPATH_UNDEF_PREFIX_ERROR;
13354 return (total); 13355 return (total);
13355 } 13356 }
13356 val = xmlXPathVariableLookupNS(ctxt->context, 13357 val = xmlXPathVariableLookupNS(ctxt->context,
13357 op->value4, URI); 13358 op->value4, URI);
13358 if (val == NULL) { 13359 if (val == NULL) {
13359 ctxt->error = XPATH_UNDEF_VARIABLE_ERROR; 13360 ctxt->error = XPATH_UNDEF_VARIABLE_ERROR;
13360 return(0); 13361 return(0);
13361 } 13362 }
13362 valuePush(ctxt, val); 13363 valuePush(ctxt, val);
13363 } 13364 }
(...skipping 28 matching lines...) Expand all
13392 if (op->value5 == NULL) 13393 if (op->value5 == NULL)
13393 func = 13394 func =
13394 xmlXPathFunctionLookup(ctxt->context, 13395 xmlXPathFunctionLookup(ctxt->context,
13395 op->value4); 13396 op->value4);
13396 else { 13397 else {
13397 URI = xmlXPathNsLookup(ctxt->context, op->value5); 13398 URI = xmlXPathNsLookup(ctxt->context, op->value5);
13398 if (URI == NULL) { 13399 if (URI == NULL) {
13399 xmlGenericError(xmlGenericErrorContext, 13400 xmlGenericError(xmlGenericErrorContext,
13400 "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n", 13401 "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n",
13401 (char *)op->value4, (char *)op->value5); 13402 (char *)op->value4, (char *)op->value5);
13403 ctxt->error = XPATH_UNDEF_PREFIX_ERROR;
13402 return (total); 13404 return (total);
13403 } 13405 }
13404 func = xmlXPathFunctionLookupNS(ctxt->context, 13406 func = xmlXPathFunctionLookupNS(ctxt->context,
13405 op->value4, URI); 13407 op->value4, URI);
13406 } 13408 }
13407 if (func == NULL) { 13409 if (func == NULL) {
13408 xmlGenericError(xmlGenericErrorContext, 13410 xmlGenericError(xmlGenericErrorContext,
13409 "xmlXPathCompOpEval: function %s not found\n", 13411 "xmlXPathCompOpEval: function %s not found\n",
13410 (char *)op->value4); 13412 (char *)op->value4);
13411 XP_ERROR0(XPATH_UNKNOWN_FUNC_ERROR); 13413 XP_ERROR0(XPATH_UNKNOWN_FUNC_ERROR);
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after
15146 xmlXPathTranslateFunction); 15148 xmlXPathTranslateFunction);
15147 15149
15148 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri", 15150 xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri",
15149 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions", 15151 (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions",
15150 xmlXPathEscapeUriFunction); 15152 xmlXPathEscapeUriFunction);
15151 } 15153 }
15152 15154
15153 #endif /* LIBXML_XPATH_ENABLED */ 15155 #endif /* LIBXML_XPATH_ENABLED */
15154 #define bottom_xpath 15156 #define bottom_xpath
15155 #include "elfgcchack.h" 15157 #include "elfgcchack.h"
OLDNEW
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698