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

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

Issue 2797923004: Improve XML serialization, URI parsing, and XPath node set processing. (Closed)
Patch Set: Rebase. Created 3 years, 8 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
« no previous file with comments | « third_party/libxml/chromium/roll.py ('k') | third_party/libxml/src/uri.c » ('j') | 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 * parser.c : an XML 1.0 parser, namespaces and validity support are mostly 2 * parser.c : an XML 1.0 parser, namespaces and validity support are mostly
3 * implemented on top of the SAX interfaces 3 * implemented on top of the SAX interfaces
4 * 4 *
5 * References: 5 * References:
6 * The XML specification: 6 * The XML specification:
7 * http://www.w3.org/TR/REC-xml 7 * http://www.w3.org/TR/REC-xml
8 * Original 1.0 version: 8 * Original 1.0 version:
9 * http://www.w3.org/TR/1998/REC-xml-19980210 9 * http://www.w3.org/TR/1998/REC-xml-19980210
10 * XML second edition working draft 10 * XML second edition working draft
(...skipping 8129 matching lines...) Expand 10 before | Expand all | Expand 10 after
8140 if ((entity->etype != XML_INTERNAL_PARAMETER_ENTITY) && 8140 if ((entity->etype != XML_INTERNAL_PARAMETER_ENTITY) &&
8141 (entity->etype != XML_EXTERNAL_PARAMETER_ENTITY)) { 8141 (entity->etype != XML_EXTERNAL_PARAMETER_ENTITY)) {
8142 xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY, 8142 xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY,
8143 "Internal: %%%s; is not a parameter entity\n", 8143 "Internal: %%%s; is not a parameter entity\n",
8144 name, NULL); 8144 name, NULL);
8145 } else if (ctxt->input->free != deallocblankswrapper) { 8145 } else if (ctxt->input->free != deallocblankswrapper) {
8146 input = xmlNewBlanksWrapperInputStream(ctxt, entity); 8146 input = xmlNewBlanksWrapperInputStream(ctxt, entity);
8147 if (xmlPushInput(ctxt, input) < 0) 8147 if (xmlPushInput(ctxt, input) < 0)
8148 return; 8148 return;
8149 } else { 8149 } else {
8150 if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
8151 ((ctxt->options & XML_PARSE_NOENT) == 0) &&
8152 ((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
8153 ((ctxt->options & XML_PARSE_DTDLOAD) == 0) &&
8154 ((ctxt->options & XML_PARSE_DTDATTR) == 0) &&
8155 (ctxt->replaceEntities == 0) &&
8156 (ctxt->validate == 0))
8157 return;
8150 /* 8158 /*
8151 * TODO !!! 8159 * TODO !!!
8152 * handle the extra spaces added before and after 8160 * handle the extra spaces added before and after
8153 * c.f. http://www.w3.org/TR/REC-xml#as-PE 8161 * c.f. http://www.w3.org/TR/REC-xml#as-PE
8154 */ 8162 */
8155 input = xmlNewEntityInputStream(ctxt, entity); 8163 input = xmlNewEntityInputStream(ctxt, entity);
8156 if (xmlPushInput(ctxt, input) < 0) 8164 if (xmlPushInput(ctxt, input) < 0)
8157 return; 8165 return;
8158 if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) && 8166 if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
8159 (CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && 8167 (CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) &&
(...skipping 7672 matching lines...) Expand 10 before | Expand all | Expand 10 after
15832 if (stream == NULL) { 15840 if (stream == NULL) {
15833 xmlFreeParserInputBuffer(input); 15841 xmlFreeParserInputBuffer(input);
15834 return (NULL); 15842 return (NULL);
15835 } 15843 }
15836 inputPush(ctxt, stream); 15844 inputPush(ctxt, stream);
15837 return (xmlDoRead(ctxt, URL, encoding, options, 1)); 15845 return (xmlDoRead(ctxt, URL, encoding, options, 1));
15838 } 15846 }
15839 15847
15840 #define bottom_parser 15848 #define bottom_parser
15841 #include "elfgcchack.h" 15849 #include "elfgcchack.h"
OLDNEW
« no previous file with comments | « third_party/libxml/chromium/roll.py ('k') | third_party/libxml/src/uri.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698