1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

parser: Avoid duplicate namespace errors

Don't report an extra attribute uniqueness error if a namespace is
undeclared. This matches old behavior.
This commit is contained in:
Nick Wellnhofer
2024-01-05 15:40:23 +01:00
parent 02cc5c3609
commit f237e5b934
6 changed files with 18 additions and 0 deletions

View File

@@ -9249,6 +9249,12 @@ next_attr:
nameHashValue = ctxt->attallocs[j] | 0x80000000;
if (nsIndex == NS_INDEX_EMPTY) {
/*
* Prefix with empty namespace means an undeclared
* prefix which was already reported above.
*/
if (aprefix != NULL)
continue;
nsuri = NULL;
uriHashValue = URI_HASH_EMPTY;
} else if (nsIndex == NS_INDEX_XML) {