mirror of
https://github.com/instant-labs/instant-xml.git
synced 2025-02-16 06:52:15 +00:00
Attributes don't inherit the default namespace
This commit is contained in:
parent
f8b4364acd
commit
a2aadde276
@ -338,6 +338,7 @@ fn named_field(
|
||||
let field_name = field.ident.as_ref().unwrap();
|
||||
let field_tag = field_meta.tag;
|
||||
let default_ns = match &field_meta.ns.uri {
|
||||
None if field_meta.attribute => &None,
|
||||
None => &container_meta.ns.uri,
|
||||
_ => &field_meta.ns.uri,
|
||||
};
|
||||
|
@ -156,7 +156,7 @@ impl<'xml> Context<'xml> {
|
||||
Some(ns) => self
|
||||
.lookup(ns)
|
||||
.ok_or_else(|| Error::UnknownPrefix(ns.to_owned()))?,
|
||||
None => self.default_ns(),
|
||||
None => "",
|
||||
},
|
||||
name: attr.local,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user