List<Node> (org.w3c.dom.Document basedoc, Format format, List<? extends Content> list) { List<Node> ret = new ArrayList<>(list.size()); FormatStack formatStack = new FormatStack(format); NamespaceStack namespaceStack = new NamespaceStack(); for (Content c : list) { formatStack.push(); try { Node node = helperContentDispatcher(formatStack, namespaceStack, basedoc, c); if (node != null) { ret.add(node); } } finally { formatStack.pop(); } } return ret; }