if (references == null)
{
throw new ParseException("The 'references' attribute is required for template definitions",
getRootHandler().getDocumentLocator());
}
TemplateDescription template = templateCollection.getTemplate(references);
if (template == null)
{
throw new ParseException("The template '" + references + "' is not defined",
getRootHandler().getDocumentLocator());
}
// Clone the defined template ... we don't change the original ..
template = (TemplateDescription) template.getInstance();
if (templateName != null)
{
template.setName(templateName);
templateCollection.addTemplate(template);
}
setObjectDescription(template);
}