Improved no children node case.
This commit is contained in:
parent
cb90963a61
commit
b00a7aeb62
1 changed files with 3 additions and 3 deletions
|
@ -312,7 +312,7 @@ public class Presenter
|
|||
result = ""; // Grrrr, Java ...
|
||||
|
||||
NodeList children = node.getChildNodes();
|
||||
if (children == null)
|
||||
if ((children == null) || (children.getLength() == 0))
|
||||
{
|
||||
result = "";
|
||||
}
|
||||
|
@ -895,7 +895,7 @@ public class Presenter
|
|||
// Build attributes.
|
||||
result.append(processAttributes(attrs, data.attributes(), suffix));
|
||||
|
||||
if ((node.getChildNodes() == null) && ((data == null) || (data.display() == null)))
|
||||
if (((node.getChildNodes() == null) || (node.getChildNodes().getLength() == 0)) && ((data == null) || (data.display() == null)))
|
||||
{
|
||||
// Close the tag.
|
||||
result.append(" />");
|
||||
|
@ -940,7 +940,7 @@ public class Presenter
|
|||
|
||||
result.append(processAttributes(attrs, data.attributes(), Integer.toString(nLine)));
|
||||
|
||||
if ((node.getChildNodes() == null) && ((data == null) || (data.display() == null)))
|
||||
if (((node.getChildNodes() == null) || (node.getChildNodes().getLength() == 0)) && ((data == null) || (data.display() == null)))
|
||||
{
|
||||
// Close the tag.
|
||||
result.append(" />\n");
|
||||
|
|
Loading…
Reference in a new issue