summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoEntryElement.java
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2011-09-07 18:24:44 +0200
committerDavid A. Madore <david+git@madore.org>2011-09-07 18:24:44 +0200
commit5d04d7e32ab93c6b3c3ec7e3698f0a41b55fa4cb (patch)
tree58f3252da010cafffe63f896f526ae5f093f2a19 /org/madore/damlengine/TodoEntryElement.java
parent457ce3fb7d0bd2198d1397912093cc1f99befe26 (diff)
downloaddamlengine-5d04d7e32ab93c6b3c3ec7e3698f0a41b55fa4cb.tar.gz
damlengine-5d04d7e32ab93c6b3c3ec7e3698f0a41b55fa4cb.tar.bz2
damlengine-5d04d7e32ab93c6b3c3ec7e3698f0a41b55fa4cb.zip
Also use HTML5 elements (article, header, footer) for weblog entries.
Diffstat (limited to 'org/madore/damlengine/TodoEntryElement.java')
-rw-r--r--org/madore/damlengine/TodoEntryElement.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/org/madore/damlengine/TodoEntryElement.java b/org/madore/damlengine/TodoEntryElement.java
index 78bffd1..7365b88 100644
--- a/org/madore/damlengine/TodoEntryElement.java
+++ b/org/madore/damlengine/TodoEntryElement.java
@@ -28,7 +28,7 @@ public final class TodoEntryElement extends TodoDefaultElement {
|| caller instanceof TodoWeblogSelectElement ) )
throw new IllegalArgumentException("entry node can only be child of weblog node");
- Element div = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "div");
+ Element div = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "article");
String explicitLang = LangHelper.getLangNorec(node);
if ( explicitLang != null )
LangHelper.setLangNorec(div, explicitLang);
@@ -56,25 +56,29 @@ public final class TodoEntryElement extends TodoDefaultElement {
}
div.appendChild(ctx.doc.createTextNode("\n"));
- Element header = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "p");
- header.setAttributeNS(null, "class", "weblog-entry-header");
+ Element header = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "header");
div.appendChild(header);
div.appendChild(ctx.doc.createTextNode("\n"));
+ Element headlink = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "p");
+ headlink.setAttributeNS(null, "class", "weblog-entry-headlink");
+ header.appendChild(headlink);
+ header.appendChild(ctx.doc.createTextNode("\n"));
Element permalink = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a");
permalink.setAttributeNS(null, "href",
entryYearStr+"-"+entryMonthStr+".html"
+"#"+entryIdStr);
permalink.appendChild(ctx.doc.createTextNode(entryDateStr));
- header.appendChild(permalink);
+ headlink.appendChild(permalink);
if ( ! entryDowStr.equals("") )
- header.appendChild(ctx.doc.createTextNode(" ("+entryDowStr+")"));
+ headlink.appendChild(ctx.doc.createTextNode(" ("+entryDowStr+")"));
Context ctx2 = ctx.clone();
ctx2.ent
= new Context.EntryContext(entryYearStr, entryMonthStr, entryDayStr,
entryNumberStr, entryDowStr);
ctx2.ent.headerNode = header;
+ ctx2.ent.headlinkNode = headlink;
ArrayList<Node> childList = getChildList(this.node);
ArrayList<TodoElement> toProcess = new ArrayList<TodoElement>(childList.size()+8);