From fab2da0e75bc84e0a811c31a8082e4b00769b5e5 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sun, 10 Oct 2010 00:29:18 +0200 Subject: Handle title and subtitle. --- org/madore/damlengine/TodoBodyElement.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'org/madore/damlengine/TodoBodyElement.java') diff --git a/org/madore/damlengine/TodoBodyElement.java b/org/madore/damlengine/TodoBodyElement.java index e70bd3b..fd75b89 100644 --- a/org/madore/damlengine/TodoBodyElement.java +++ b/org/madore/damlengine/TodoBodyElement.java @@ -35,6 +35,24 @@ public final class TodoBodyElement extends TodoDefaultElement { ArrayList childList = getChildList(this.node); ArrayList toProcess = new ArrayList(childList.size()+8); + if ( node.getAttributeNS(null, "notitle").equals("") + && ctx.title != null ) { + Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS, + "d:implicit-do-title"); + bodyNode.appendChild(ctx.doc.createTextNode("\n")); + bodyNode.appendChild(token); + toProcess.add(new TodoTitleOrSubtitle(TodoTitleOrSubtitle.Type.TITLE, + token, this.ctx, this)); + } + if ( node.getAttributeNS(null, "nosubtitle").equals("") + && ctx.subtitle != null ) { + Element token = ctx.doc.createElementNS(DamlEngine.DAML_NS, + "d:implicit-do-subtitle"); + bodyNode.appendChild(ctx.doc.createTextNode("\n")); + bodyNode.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"); -- cgit v1.2.3