From 045c56305ad585b037aff655ddbf74490e35e5be Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Mon, 13 Feb 2012 23:58:51 +0100 Subject: Fix style and class attributes on elements. --- org/madore/damlengine/TodoEntryElement.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'org/madore') diff --git a/org/madore/damlengine/TodoEntryElement.java b/org/madore/damlengine/TodoEntryElement.java index 4b844a9..de9c60d 100644 --- a/org/madore/damlengine/TodoEntryElement.java +++ b/org/madore/damlengine/TodoEntryElement.java @@ -62,11 +62,18 @@ public final class TodoEntryElement extends TodoDefaultElement { String entryIdStr = "d."+entryDateStr+"."+entryNumberStr; article.setAttributeNS(null, "id", entryIdStr); - article.setAttributeNS(null, "class", "weblog-entry hentry"); + { + String classAtt = node.getAttributeNS(null, "class"); + if ( ! classAtt.equals("") ) + article.setAttributeNS(null, "class", + "weblog-entry hentry "+classAtt); + else + article.setAttributeNS(null, "class", "weblog-entry hentry"); + } { String styleAtt = node.getAttributeNS(null, "style"); if ( ! styleAtt.equals("") ) - node.setAttributeNS(null, "style", styleAtt); + article.setAttributeNS(null, "style", styleAtt); } article.appendChild(ctx.doc.createTextNode("\n")); -- cgit v1.2.3