throws SAXException
{
final String templateName = attrs.getValue(getUri(), "name");
if (nameRequired && templateName == null)
{
throw new ParseException("The 'name' attribute is required for template definitions",
getRootHandler().getDocumentLocator());
}
final String references = attrs.getValue(getUri(), "references");
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();