writer.write('<');
writer.write(element.getOriginalName());
if (element.hasAttributes()) {
final Configuration configuration = arguments.getConfiguration();
final Attribute[] attributes = element.unsafeGetAttributes();
final int attributesLen = element.numAttributes();
for (int i = 0; i < attributesLen; i++) {
final Attribute attribute = attributes[i];
boolean writeAttribute = true;
if (attribute.getNormalizedName().startsWith("xmlns:")) {
// xmlns attributes related to thymeleaf-managed prefixes (prefixes assigned to any of the
// dialects configured at the template engine) are always removed.
final String xmlnsPrefix = attribute.getNormalizedName().substring("xmlns:".length());
if (configuration.isPrefixManaged(xmlnsPrefix)) {
writeAttribute = false;
}
}
if (writeAttribute) {