wip
This commit is contained in:
parent
c341dcb73c
commit
04a74637c8
|
@ -260,8 +260,8 @@ impl Deserializer {
|
|||
match def_prefix {
|
||||
Some(def_prefix) => {
|
||||
// Check if defined and gotten namespaces equals for each field
|
||||
if deserializer.get_parser_namespace(&parser_prefix)
|
||||
!= deserializer.get_def_namespace(def_prefix) {
|
||||
if deserializer.parser_namespace(&parser_prefix)
|
||||
!= deserializer.default_namespace(def_prefix) {
|
||||
return Err(Error::WrongNamespace)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -236,12 +236,12 @@ impl<'xml> Deserializer<'xml> {
|
|||
self.parser.peek_next_tag()
|
||||
}
|
||||
|
||||
pub fn get_def_namespace(&self, prefix: &str) -> Option<&&str> {
|
||||
self.def_namespaces.get(prefix)
|
||||
pub fn default_namespace(&self, prefix: &str) -> Option<&str> {
|
||||
self.def_namespaces.get(prefix).map(|&ns| ns)
|
||||
}
|
||||
|
||||
pub fn get_parser_namespace(&self, prefix: &str) -> Option<&&str> {
|
||||
self.parser_namespaces.get(prefix)
|
||||
pub fn parser_namespace(&self, prefix: &str) -> Option<&str> {
|
||||
self.parser_namespaces.get(prefix).map(|&ns| ns)
|
||||
}
|
||||
|
||||
pub fn compare_parser_and_def_default_namespaces(&self) -> bool {
|
||||
|
|
Loading…
Reference in New Issue