Fix double br bug.

This commit is contained in:
Christian P. MOMON 2013-07-02 10:59:19 +02:00
parent a0c4e3dcdf
commit cb90963a61

View file

@ -442,7 +442,7 @@ public class Presenter
// Is there anything to do? // Is there anything to do?
if (node != null) if (node != null)
{ {
logger.debug("nodeName=" + node.getNodeName()); logger.debug("nodeName=[{}]", node.getNodeName());
// Find the name attribute value. // Find the name attribute value.
String name; String name;
name = getClassAttributeValue(node); name = getClassAttributeValue(node);
@ -478,7 +478,7 @@ public class Presenter
case Node.ELEMENT_NODE: case Node.ELEMENT_NODE:
{ {
logger.debug("case Node.ELEMENT_NODE"); logger.debug("case Node.ELEMENT_NODE [{}]", node.getNodeName());
NamedNodeMap attrs = node.getAttributes(); NamedNodeMap attrs = node.getAttributes();
Node idAttr = attrs.getNamedItem("id"); Node idAttr = attrs.getNamedItem("id");
@ -807,7 +807,7 @@ public class Presenter
*/ */
static void processElementBasically(final Writer result, final Node node, final TagDataListById datas, final String suffix) throws Exception static void processElementBasically(final Writer result, final Node node, final TagDataListById datas, final String suffix) throws Exception
{ {
logger.debug("processElementBasically - started"); logger.debug("processElementBasically - started [{}]", node.getNodeName());
// Open the tag. // Open the tag.
result.append('<'); result.append('<');
@ -819,7 +819,7 @@ public class Presenter
result.append(processAttributes(node.getAttributes(), null, suffix)); result.append(processAttributes(node.getAttributes(), null, suffix));
// //
if (node.getChildNodes() == null) if ((node.getChildNodes() == null) || (node.getChildNodes().getLength() == 0))
{ {
result.append(" />"); result.append(" />");
} }