AlertSetBuilder alertSetBuilder = new AlertSetBuilder(parseTree.getAlerts());
// make sure root element is a template
List<ParsedElement> children = parseTree.getChildren();
if (!children.isEmpty()) {
ParsedElement first = children.get(0);
if (!first.canBeRoot()) {
alertSetBuilder.add(new InvalidRootError(first));
} else {
// determine the schema of this gxp
String contentType = DEFAULT_CONTENT_TYPE;
for (ParsedAttribute attr : first.getAttributes()) {
if (attr.getName().equals("content-type")
&& attr.getNamespace() == NullNamespace.INSTANCE) {
contentType = attr.getValue();
}
}