1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 18:29:45 +02:00

[core] Fix XmlEnvironment namespace: Use default namespace (not element's)

Assume the element
<foo:bar xmlns='namespace' xmlns:foo='foo-namespace'/>

then the <bar/> element's namespace is 'foo-namespace', but the
default namespace is 'namespace'. And this is the namespace that
scopes into inner elements.
This commit is contained in:
Florian Schmaus 2021-01-24 19:23:18 +01:00
parent ec2ef1facc
commit 84d73e9623
3 changed files with 39 additions and 4 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2019 Florian Schmaus.
* Copyright 2019-2021 Florian Schmaus.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -75,6 +75,10 @@ public interface XmlPullParser {
String getNamespace(String prefix);
default String getDefaultNamespace() {
return getNamespace(null);
}
int getDepth();
String getPositionDescription();