mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
parser: Don't use 'standalone' member of xmlParserInput
The standalone declaration is only parsed in the main input stream.
This commit is contained in:
7
parser.c
7
parser.c
@@ -10320,7 +10320,8 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
|
|||||||
* XML declaration but it does not have a standalone attribute.
|
* XML declaration but it does not have a standalone attribute.
|
||||||
* It will be overwritten later if a standalone attribute is found.
|
* It will be overwritten later if a standalone attribute is found.
|
||||||
*/
|
*/
|
||||||
ctxt->input->standalone = -2;
|
|
||||||
|
ctxt->standalone = -2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We know that '<?xml' is here.
|
* We know that '<?xml' is here.
|
||||||
@@ -10401,7 +10402,7 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
|
|||||||
GROW;
|
GROW;
|
||||||
|
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
ctxt->input->standalone = xmlParseSDDecl(ctxt);
|
ctxt->standalone = xmlParseSDDecl(ctxt);
|
||||||
|
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
if ((RAW == '?') && (NXT(1) == '>')) {
|
if ((RAW == '?') && (NXT(1) == '>')) {
|
||||||
@@ -10525,7 +10526,6 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
|
|||||||
*/
|
*/
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
ctxt->standalone = ctxt->input->standalone;
|
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
} else {
|
} else {
|
||||||
ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION);
|
ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION);
|
||||||
@@ -11265,7 +11265,6 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
|
|||||||
xmlHaltParser(ctxt);
|
xmlHaltParser(ctxt);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
ctxt->standalone = ctxt->input->standalone;
|
|
||||||
if ((ctxt->encoding == NULL) &&
|
if ((ctxt->encoding == NULL) &&
|
||||||
(ctxt->input->encoding != NULL))
|
(ctxt->input->encoding != NULL))
|
||||||
ctxt->encoding = xmlStrdup(ctxt->input->encoding);
|
ctxt->encoding = xmlStrdup(ctxt->input->encoding);
|
||||||
|
|||||||
@@ -1601,7 +1601,6 @@ xmlNewInputStream(xmlParserCtxtPtr ctxt) {
|
|||||||
memset(input, 0, sizeof(xmlParserInput));
|
memset(input, 0, sizeof(xmlParserInput));
|
||||||
input->line = 1;
|
input->line = 1;
|
||||||
input->col = 1;
|
input->col = 1;
|
||||||
input->standalone = -1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the context is NULL the id cannot be initialized, but that
|
* If the context is NULL the id cannot be initialized, but that
|
||||||
|
|||||||
Reference in New Issue
Block a user