Fixes #44: Two prefixes resolving to the same namespace

The new TreeBuilder addition seems to have fixed this bug. I added the
test that was provided in !108 by Oliver Inemar but not the rest of the
code.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2023-01-14 22:32:00 +01:00
parent 93174f97ec
commit 8977745fe3
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -989,4 +989,20 @@ mod tests {
assert_eq!(elem, elem2);
}
#[test]
fn failure_with_duplicate_namespace() {
let elem: Element = r###"<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xsd:schema>
</wsdl:types>
</wsdl:definitions>
"###
.parse()
.unwrap();
}
}