summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoDamlElement.java
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2011-09-07 18:01:38 +0200
committerDavid A. Madore <david+git@madore.org>2011-09-07 18:01:38 +0200
commit457ce3fb7d0bd2198d1397912093cc1f99befe26 (patch)
treecd102997f1e73fe2fb6bbce9402e50861f244a12 /org/madore/damlengine/TodoDamlElement.java
parent9d7357116a9d47c1dacd2bddfb1bbdea50f3e5fb (diff)
downloaddamlengine-457ce3fb7d0bd2198d1397912093cc1f99befe26.tar.gz
damlengine-457ce3fb7d0bd2198d1397912093cc1f99befe26.tar.bz2
damlengine-457ce3fb7d0bd2198d1397912093cc1f99befe26.zip
Use HTML5 elements for header, hgroup, nav(bar), footer.
Diffstat (limited to 'org/madore/damlengine/TodoDamlElement.java')
-rw-r--r--org/madore/damlengine/TodoDamlElement.java22
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 ) {