diff options
author | David A. Madore <david+git@madore.org> | 2011-09-07 14:51:59 +0200 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2011-09-07 14:51:59 +0200 |
commit | 7fb2155a48f7312ff71bc841ce587c44f333384b (patch) | |
tree | a2c303966a686f5450adf99178b95bab28a90fab /org/madore/damlengine/TodoKillAElement.java | |
parent | 58e0ddcdc2b5d47db753868b3cc937bbac59ec55 (diff) | |
download | damlengine-7fb2155a48f7312ff71bc841ce587c44f333384b.tar.gz damlengine-7fb2155a48f7312ff71bc841ce587c44f333384b.tar.bz2 damlengine-7fb2155a48f7312ff71bc841ce587c44f333384b.zip |
Fix and correct some aspects of language handling.
In particular, take better care to ensure that when an element is
removed which might have an xml:lang attribute, its children keep
their original language.
Diffstat (limited to 'org/madore/damlengine/TodoKillAElement.java')
-rw-r--r-- | org/madore/damlengine/TodoKillAElement.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org/madore/damlengine/TodoKillAElement.java b/org/madore/damlengine/TodoKillAElement.java index 4478fae..f230ee0 100644 --- a/org/madore/damlengine/TodoKillAElement.java +++ b/org/madore/damlengine/TodoKillAElement.java @@ -22,11 +22,14 @@ public final class TodoKillAElement extends TodoDefaultElement { @Override public void handleNodeOnly() { + String explicitLang = LangHelper.getLangNorec(this.node); ArrayList<Node> childList = getChildList(node); ArrayList<TodoElement> toProcess = new ArrayList<TodoElement>(childList.size()); for ( Node child : childList ) { node.getParentNode().insertBefore(child, node); if ( child.getNodeType() == Node.ELEMENT_NODE ) { + if ( explicitLang != null ) + LangHelper.setWeakLangNorec((Element)child, explicitLang); TodoElement it = TodoElement.getTodoElement((Element)child, this.ctx, this); toProcess.add(it); |