1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

found another bug while looking at #309616 on missing entities. this

* parser.c: found another bug while looking at #309616 on missing
  entities.
* result/ent2.sax* result/ent7.sax* result/xml2.sax*: this changed the
  SAX stream in missing conditions for a few tests
Daniel
This commit is contained in:
Daniel Veillard
2005-08-24 14:46:07 +00:00
parent 2644ab270e
commit 53bd1f3c2c
8 changed files with 18 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
Wed Aug 24 16:44:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
* parser.c: found another bug while looking at #309616 on missing
entities.
* result/ent2.sax* result/ent7.sax* result/xml2.sax*: this changed the
SAX stream in missing conditions for a few tests
Wed Aug 24 16:19:00 CEST 2005 Daniel Veillard <daniel@veillard.com> Wed Aug 24 16:19:00 CEST 2005 Daniel Veillard <daniel@veillard.com>
* encoding.c: applied the patch suggested #309565 which can avoid * encoding.c: applied the patch suggested #309565 which can avoid

View File

@@ -6100,6 +6100,11 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
} else { } else {
xmlErrMsgStr(ctxt, XML_WAR_UNDECLARED_ENTITY, xmlErrMsgStr(ctxt, XML_WAR_UNDECLARED_ENTITY,
"Entity '%s' not defined\n", name); "Entity '%s' not defined\n", name);
if ((ctxt->inSubset == 0) &&
(ctxt->sax != NULL) &&
(ctxt->sax->reference != NULL)) {
ctxt->sax->reference(ctxt, name);
}
} }
ctxt->valid = 0; ctxt->valid = 0;
} }

View File

@@ -11,6 +11,7 @@ SAX.characters(
, 3) , 3)
SAX.getEntity(title) SAX.getEntity(title)
SAX.error: Entity 'title' not defined SAX.error: Entity 'title' not defined
SAX.reference(title)
SAX.characters( SAX.characters(
This text is about XML, the, 31) This text is about XML, the, 31)
SAX.getEntity(xml) SAX.getEntity(xml)

View File

@@ -11,6 +11,7 @@ SAX.characters(
, 3) , 3)
SAX.getEntity(title) SAX.getEntity(title)
SAX.error: Entity 'title' not defined SAX.error: Entity 'title' not defined
SAX.reference(title)
SAX.characters( SAX.characters(
This text is about XML, the, 31) This text is about XML, the, 31)
SAX.getEntity(xml) SAX.getEntity(xml)

View File

@@ -11,6 +11,7 @@ SAX.error: PEReference: %sampleEnt; not found
SAX.characters('they called me , 16) SAX.characters('they called me , 16)
SAX.getEntity(sampleEnt) SAX.getEntity(sampleEnt)
SAX.error: Entity 'sampleEnt' not defined SAX.error: Entity 'sampleEnt' not defined
SAX.reference(sampleEnt)
SAX.characters(', 1) SAX.characters(', 1)
SAX.endDocument() SAX.endDocument()
xmlSAXUserParseFile returned error 27 xmlSAXUserParseFile returned error 27

View File

@@ -11,6 +11,7 @@ SAX.error: PEReference: %sampleEnt; not found
SAX.characters('they called me , 16) SAX.characters('they called me , 16)
SAX.getEntity(sampleEnt) SAX.getEntity(sampleEnt)
SAX.error: Entity 'sampleEnt' not defined SAX.error: Entity 'sampleEnt' not defined
SAX.reference(sampleEnt)
SAX.characters(', 1) SAX.characters(', 1)
SAX.endDocument() SAX.endDocument()
xmlSAXUserParseFile returned error 27 xmlSAXUserParseFile returned error 27

View File

@@ -12,6 +12,7 @@ SAX.error: PEReference: %xx; not found
SAX.characters(This sample shows a , 20) SAX.characters(This sample shows a , 20)
SAX.getEntity(tricky) SAX.getEntity(tricky)
SAX.error: Entity 'tricky' not defined SAX.error: Entity 'tricky' not defined
SAX.reference(tricky)
SAX.characters( method., 8) SAX.characters( method., 8)
SAX.endDocument() SAX.endDocument()
xmlSAXUserParseFile returned error 27 xmlSAXUserParseFile returned error 27

View File

@@ -12,6 +12,7 @@ SAX.error: PEReference: %xx; not found
SAX.characters(This sample shows a , 20) SAX.characters(This sample shows a , 20)
SAX.getEntity(tricky) SAX.getEntity(tricky)
SAX.error: Entity 'tricky' not defined SAX.error: Entity 'tricky' not defined
SAX.reference(tricky)
SAX.characters( method., 8) SAX.characters( method., 8)
SAX.endDocument() SAX.endDocument()
xmlSAXUserParseFile returned error 27 xmlSAXUserParseFile returned error 27