diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2005-06-09 08:18:24 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2005-06-09 08:18:24 +0000 |
commit | 365cf67ff812caf2f3edc7c52955c4ffa8fb2597 (patch) | |
tree | 44ec1eda460c87c18751258ace907776aefbbcfb | |
parent | d892557d993be0ae7d1d5c817fbec680844b30db (diff) | |
download | libxml2-365cf67ff812caf2f3edc7c52955c4ffa8fb2597.tar.gz |
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
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | parser.c | 3 | ||||
-rw-r--r-- | result/noent/nsclean.xml | 5 | ||||
-rw-r--r-- | result/nsclean.xml | 5 | ||||
-rw-r--r-- | result/nsclean.xml.rde | 10 | ||||
-rw-r--r-- | result/nsclean.xml.rdr | 10 | ||||
-rw-r--r-- | result/nsclean.xml.sax | 13 | ||||
-rw-r--r-- | test/nsclean.xml | 9 |
8 files changed, 62 insertions, 0 deletions
@@ -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 @@ -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) { diff --git a/result/noent/nsclean.xml b/result/noent/nsclean.xml new file mode 100644 index 00000000..8f1ea823 --- /dev/null +++ b/result/noent/nsclean.xml @@ -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> diff --git a/result/nsclean.xml b/result/nsclean.xml new file mode 100644 index 00000000..8f1ea823 --- /dev/null +++ b/result/nsclean.xml @@ -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> diff --git a/result/nsclean.xml.rde b/result/nsclean.xml.rde new file mode 100644 index 00000000..c606593b --- /dev/null +++ b/result/nsclean.xml.rde @@ -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 diff --git a/result/nsclean.xml.rdr b/result/nsclean.xml.rdr new file mode 100644 index 00000000..c606593b --- /dev/null +++ b/result/nsclean.xml.rdr @@ -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 diff --git a/result/nsclean.xml.sax b/result/nsclean.xml.sax new file mode 100644 index 00000000..b01aeae7 --- /dev/null +++ b/result/nsclean.xml.sax @@ -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() diff --git a/test/nsclean.xml b/test/nsclean.xml new file mode 100644 index 00000000..c293ddb6 --- /dev/null +++ b/test/nsclean.xml @@ -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> + |