| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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" |
| OLD | NEW |