values.add(new PlaceholderStart(element, elementSchema, name, null));
if (whitespaceContent) {
values.add(element);
} else {
List<Expression> contentValues = Lists.newArrayList();
contentValues.add(new PlaceholderEnd(element, elementSchema));
contentValues.add(element.getContent().acceptVisitor(this));
contentValues.add(new PlaceholderStart(element, elementSchema,
phName + "_end", null));
Expression content = Concatenation.create(element.getSourcePosition(),
null, contentValues);
boolean oldInsidePh = insidePh;
insidePh = true;
values.add(element.withAttributesAndContent(
Util.map(element.getAttributes(), getAttributeFunction()),
content));
insidePh = oldInsidePh;
}
values.add(new PlaceholderEnd(element, elementSchema));
return Concatenation.create(element.getSourcePosition(), elementSchema, values);
}