1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-09 04:58:16 +03:00

applied patch from Malcolm Rowe to avoid namespace troubles on rollback

* parser.c: applied patch from Malcolm Rowe to avoid namespace
  troubles on rollback parsing of elements start #304761
* test/nsclean.xml result/noent/nsclean.xml result/nsclean.xml*:
  added it to the regression tests.
Daniel
This commit is contained in:
Daniel Veillard 2005-06-09 08:18:24 +00:00
parent d892557d99
commit 365cf67ff8
8 changed files with 62 additions and 0 deletions

View File

@ -1,3 +1,10 @@
Thu Jun 9 10:16:11 CEST 2005 Daniel Veillard <daniel@veillard.com>
* parser.c: applied patch from Malcolm Rowe to avoid namespace
troubles on rollback parsing of elements start #304761
* test/nsclean.xml result/noent/nsclean.xml result/nsclean.xml*:
added it to the regression tests.
Thu Jun 9 00:33:50 CEST 2005 Daniel Veillard <daniel@veillard.com>
* parser.c include/libxml/xmlerror.h: applied patch from Rob Richards

View File

@ -7535,6 +7535,7 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
int i, j, nbNs, attval;
const xmlChar *base;
unsigned long cur;
int nsNr = ctxt->nsNr;
if (RAW != '<') return(NULL);
NEXT1;
@ -7555,6 +7556,8 @@ reparse:
nbdef = 0;
nbNs = 0;
attval = 0;
/* Forget any namespaces added during an earlier parse of this element. */
ctxt->nsNr = nsNr;
localname = xmlParseQName(ctxt, &prefix);
if (localname == NULL) {

5
result/noent/nsclean.xml Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="US-ASCII"?>
<article xmlns="tag:foofoofoofoofoofoofoofoo" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
<foop:content xmlns="http://www.w3.org/1999/xhtml" xmlns:foop="tag:foofoofoofoofoofoofoofoo">
</foop:content>
</article>

5
result/nsclean.xml Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="US-ASCII"?>
<article xmlns="tag:foofoofoofoofoofoofoofoo" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
<foop:content xmlns="http://www.w3.org/1999/xhtml" xmlns:foop="tag:foofoofoofoofoofoofoofoo">
</foop:content>
</article>

10
result/nsclean.xml.rde Normal file
View File

@ -0,0 +1,10 @@
0 1 article 0 0
1 14 #text 0 1
1 1 foop:content 0 0
2 14 #text 0 1
1 15 foop:content 0 0
1 14 #text 0 1
0 15 article 0 0

10
result/nsclean.xml.rdr Normal file
View File

@ -0,0 +1,10 @@
0 1 article 0 0
1 14 #text 0 1
1 1 foop:content 0 0
2 14 #text 0 1
1 15 foop:content 0 0
1 14 #text 0 1
0 15 article 0 0

13
result/nsclean.xml.sax Normal file
View File

@ -0,0 +1,13 @@
SAX.setDocumentLocator()
SAX.startDocument()
SAX.startElement(article, xmlns='tag:foofoofoofoofoofoofoofoo', xmlns:dc='http://purl.org/dc/elements/1.1/', xmlns:dcterms='http://purl.org/dc/terms/')
SAX.characters(
, 1)
SAX.startElement(foop:content, xmlns='http://www.w3.org/1999/xhtml', xmlns:foop='tag:foofoofoofoofoofoofoofoo')
SAX.characters(
, 1)
SAX.endElement(foop:content)
SAX.characters(
, 1)
SAX.endElement(article)
SAX.endDocument()

9
test/nsclean.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="US-ASCII"?>
<article xmlns="tag:foofoofoofoofoofoofoofoo"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/">
<foop:content xmlns="http://www.w3.org/1999/xhtml"
xmlns:foop="tag:foofoofoofoofoofoofoofoo">
</foop:content>
</article>