diff options
Diffstat (limited to 'org/madore/damlengine/TodoDamlElement.java')
-rw-r--r-- | org/madore/damlengine/TodoDamlElement.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/org/madore/damlengine/TodoDamlElement.java b/org/madore/damlengine/TodoDamlElement.java index 5237d91..93275d9 100644 --- a/org/madore/damlengine/TodoDamlElement.java +++ b/org/madore/damlengine/TodoDamlElement.java @@ -95,34 +95,40 @@ public final class TodoDamlElement extends TodoDefaultElement { ArrayList<Node> childList = getChildList(this.node); ArrayList<TodoElement> toProcessFirst = new ArrayList<TodoElement>(); ArrayList<TodoElement> toProcess = new ArrayList<TodoElement>(childList.size()+8); + Element header = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "header"); + bodyNode.appendChild(ctx.doc.createTextNode("\n")); + bodyNode.appendChild(header); + Element hgroup = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "hgroup"); + header.appendChild(ctx.doc.createTextNode("\n")); + header.appendChild(hgroup); if ( node.getAttributeNS(null, "notitle").equals("") ) { Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS, "d:implicit-do-title"); - bodyNode.appendChild(ctx.doc.createTextNode("\n")); - bodyNode.appendChild(token); + hgroup.appendChild(ctx.doc.createTextNode("\n")); + hgroup.appendChild(token); toProcess.add(new TodoTitleOrSubtitle(TodoTitleOrSubtitle.Type.TITLE, token, this.ctx, this)); } if ( node.getAttributeNS(null, "nosubtitle").equals("") ) { Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS, "d:implicit-do-subtitle"); - bodyNode.appendChild(ctx.doc.createTextNode("\n")); - bodyNode.appendChild(token); + hgroup.appendChild(ctx.doc.createTextNode("\n")); + hgroup.appendChild(token); toProcess.add(new TodoTitleOrSubtitle(TodoTitleOrSubtitle.Type.SUBTITLE, token, this.ctx, this)); } if ( node.getAttributeNS(null, "nonavbar").equals("") ) { Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS, "d:implicit-do-navbar"); - bodyNode.appendChild(ctx.doc.createTextNode("\n")); - bodyNode.appendChild(token); + header.appendChild(ctx.doc.createTextNode("\n")); + header.appendChild(token); toProcess.add(new TodoNavbar(token, this.ctx, this)); } if ( node.getAttributeNS(null, "notranslations").equals("") ) { Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS, "d:implicit-do-translations"); - bodyNode.appendChild(ctx.doc.createTextNode("\n")); - bodyNode.appendChild(token); + header.appendChild(ctx.doc.createTextNode("\n")); + header.appendChild(token); toProcess.add(new TodoTranslations(token, this.ctx, this)); } for ( Node child : childList ) { |