default String transformElements(Generator gen, T model) {
        final List<Element> elements = model.elements();
        if (elements.size() == 1 && (elements.get(0) instanceof ContentElement)) {
            return gen.on(elements.get(0)).orElse("");
        } else {
            return gen.onEach(elements)
                .map(s -> useIndent() ? Formatting.indent(s) : s)
                .collect(joinIfNotEmpty(Formatting.nl(), Formatting.nl(), Formatting.nl()));
        }
    }
@author Per Minborg
@param <T>  the type of the main view
common-parent/codegenxml/src/main/java/com/speedment/common/codegenxml/internal/view/trait/HasElementsView.java