// 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()) {