1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

fix bug #324432 with <xml:foo/> added to the regression tests Daniel

* SAX2.c: fix bug #324432 with <xml:foo/>
* test/ns7 resul//ns7*: added to the regression tests
Daniel
This commit is contained in:
Daniel Veillard 2006-01-04 14:03:10 +00:00
parent affb8688da
commit 6977c6c437
9 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Wed Jan 4 15:00:51 CET 2006 Daniel Veillard <daniel@veillard.com>
* SAX2.c: fix bug #324432 with <xml:foo/>
* test/ns7 resul//ns7*: added to the regression tests
Wed Jan 4 10:53:56 CET 2006 Daniel Veillard <daniel@veillard.com>
* include/wsockcompat.h: applied patch from Mark Junker, fixing a

4
SAX2.c
View File

@ -2233,9 +2233,13 @@ xmlSAX2StartElementNs(void *ctx,
*/
if ((URI != NULL) && (ret->ns == NULL)) {
ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix);
}
if (ret->ns == NULL) {
ns = xmlNewNs(ret, NULL, prefix);
if (ns == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
return;
}

2
result/noent/ns7 Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0"?>
<xml:test/>

2
result/ns7 Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0"?>
<xml:test/>

1
result/ns7.rde Normal file
View File

@ -0,0 +1 @@
0 1 xml:test 1 0

1
result/ns7.rdr Normal file
View File

@ -0,0 +1 @@
0 1 xml:test 1 0

5
result/ns7.sax Normal file
View File

@ -0,0 +1,5 @@
SAX.setDocumentLocator()
SAX.startDocument()
SAX.startElement(xml:test)
SAX.endElement(xml:test)
SAX.endDocument()

5
result/ns7.sax2 Normal file
View File

@ -0,0 +1,5 @@
SAX.setDocumentLocator()
SAX.startDocument()
SAX.startElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace', 0, 0, 0)
SAX.endElementNs(test, xml, 'http://www.w3.org/XML/1998/namespace')
SAX.endDocument()

1
test/ns7 Normal file
View File

@ -0,0 +1 @@
<xml:test/>