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/TodoBodyElement.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/TodoBodyElement.java')
-rw-r--r-- | org/madore/damlengine/TodoBodyElement.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org/madore/damlengine/TodoBodyElement.java b/org/madore/damlengine/TodoBodyElement.java index 1db657b..2e48ee8 100644 --- a/org/madore/damlengine/TodoBodyElement.java +++ b/org/madore/damlengine/TodoBodyElement.java @@ -27,6 +27,7 @@ public final class TodoBodyElement extends TodoDefaultElement { throw new IllegalArgumentException("body node can only be child of daml node"); Element parent = (Element)(this.node.getParentNode()); + String explicitLang = LangHelper.getLangNorec(this.node); ArrayList<Node> childList = getChildList(this.node); ArrayList<TodoElement> toProcess = new ArrayList<TodoElement>(childList.size()); for ( Node child : childList ) { @@ -37,6 +38,8 @@ public final class TodoBodyElement extends TodoDefaultElement { } parent.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); |