You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::rc::Rc;
use xrust::item::Node;
use xrust::parser::xml;
use xrust::trees::smite::Node as SmiteNode;
fn main() {
let doc_text = r#"<doc xmlns='ns1'><child xmlns='ns2'/></doc>"#;
let doc = xml::parse(Rc::new(SmiteNode::new()), doc_text, None).unwrap();
let xml_output = doc.to_xml();
println!("{}", xml_output);
}
The above is a minimal example, doing nothing except ingesting and re-exporting.
Sample document
<doc xmlns='ns1'><child xmlns='ns2'/></doc>
In the current main branch, we have the wrong namespace on the doc element
<doc xmlns='ns2'><child></child></doc>
On the dev branch both namespace declarations appear on the root node.
The above is a minimal example, doing nothing except ingesting and re-exporting.
Sample document
<doc xmlns='ns1'><child xmlns='ns2'/></doc>
In the current main branch, we have the wrong namespace on the doc element
<doc xmlns='ns2'><child></child></doc>
On the dev branch both namespace declarations appear on the root node.
<doc xmlns='ns1' xmlns='ns2'><child></child></doc>
It also happens for namespaces that are aliased, for example the document
<a:doc xmlns:a='ns1'><a:child xmlns:a='ns2'/></a:doc>
Emits in main
<a:doc xmlns:a='ns2'><a:child></a:child></a:doc>
and dev
<a:doc xmlns:a='ns1' xmlns:a='ns2'><a:child></a:child></a:doc>
The text was updated successfully, but these errors were encountered: