1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

fix the patch for unreproductable #343000 but also fix a line/column

* parser.c: fix the patch for unreproductable #343000 but
  also fix a line/column keeping error
* result/errors/attr1.xml.err result/errors/attr2.xml.err
  result/errors/name.xml.err result/errors/name2.xml.err
  result/schemas/anyAttr-processContents-err1_0_0.err
  result/schemas/bug312957_1_0.err: affected lines in error output
  of the regression tests
Daniel
This commit is contained in:
Daniel Veillard 2006-10-15 20:32:53 +00:00
parent b5f1197ce2
commit dcec672439
8 changed files with 28 additions and 8 deletions

View File

@ -1,3 +1,13 @@
Sun Oct 15 22:31:42 CEST 2006 Daniel Veillard <daniel@veillard.com>
* parser.c: fix the patch for unreproductable #343000 but
also fix a line/column keeping error
* result/errors/attr1.xml.err result/errors/attr2.xml.err
result/errors/name.xml.err result/errors/name2.xml.err
result/schemas/anyAttr-processContents-err1_0_0.err
result/schemas/bug312957_1_0.err: affected lines in error output
of the regression tests
Sat Oct 14 10:46:46 CEST 2006 Daniel Veillard <daniel@veillard.com>
* tree.c: fixing bug #344390 with xmlReconciliateNs

View File

@ -7865,7 +7865,7 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
const xmlChar **atts = ctxt->atts;
int maxatts = ctxt->maxatts;
int nratts, nbatts, nbdef;
int i, j, nbNs, attval;
int i, j, nbNs, attval, oldline, oldcol;
const xmlChar *base;
unsigned long cur;
int nsNr = ctxt->nsNr;
@ -7884,6 +7884,8 @@ reparse:
SHRINK;
base = ctxt->input->base;
cur = ctxt->input->cur - ctxt->input->base;
oldline = ctxt->input->line;
oldcol = ctxt->input->col;
nbatts = 0;
nratts = 0;
nbdef = 0;
@ -7918,6 +7920,12 @@ reparse:
attname = xmlParseAttribute2(ctxt, prefix, localname,
&aprefix, &attvalue, &len, &alloc);
if (ctxt->input->base != base) {
if ((attvalue != NULL) && (alloc != 0))
xmlFree(attvalue);
attvalue = NULL;
goto base_changed;
}
if ((attname != NULL) && (attvalue != NULL)) {
if (len < 0) len = xmlStrlen(attvalue);
if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
@ -8209,6 +8217,8 @@ base_changed:
xmlFree((xmlChar *) atts[i]);
}
ctxt->input->cur = ctxt->input->base + cur;
ctxt->input->line = oldline;
ctxt->input->col = oldcol;
if (ctxt->wellFormed == 1) {
goto reparse;
}

View File

@ -1,6 +1,6 @@
./test/errors/attr1.xml:2: parser error : AttValue: ' expected
^
./test/errors/attr1.xml:2: parser error : Extra content at the end of the document
./test/errors/attr1.xml:1: parser error : Extra content at the end of the document
<foo foo="oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
^

View File

@ -1,6 +1,6 @@
./test/errors/attr2.xml:2: parser error : AttValue: ' expected
^
./test/errors/attr2.xml:2: parser error : Extra content at the end of the document
./test/errors/attr2.xml:1: parser error : Extra content at the end of the document
<foo foo=">ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
^

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
./test/schemas/anyAttr-processContents-err1_0.xml:11: element elem.lax: Schemas validity error : Element '{http://FOO}elem.lax', attribute '{http://FOO}bar': 'o o' is not a valid value of the atomic type 'xs:language'.
./test/schemas/anyAttr-processContents-err1_0.xml:12: element elem.strict: Schemas validity error : Element '{http://FOO}elem.strict', attribute '{http://FOO}barB': No matching global attribute declaration available, but demanded by the strict wildcard.
./test/schemas/anyAttr-processContents-err1_0.xml:8: element elem.lax: Schemas validity error : Element '{http://FOO}elem.lax', attribute '{http://FOO}bar': 'o o' is not a valid value of the atomic type 'xs:language'.
./test/schemas/anyAttr-processContents-err1_0.xml:9: element elem.strict: Schemas validity error : Element '{http://FOO}elem.strict', attribute '{http://FOO}barB': No matching global attribute declaration available, but demanded by the strict wildcard.

View File

@ -1 +1 @@
./test/schemas/bug312957_0.xml:11: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of keyref 'sibling_key_ref'.
./test/schemas/bug312957_0.xml:10: Schemas validity error : Element 'sister': No match found for key-sequence ['annie'] of keyref 'sibling_key_ref'.