try
{
templateDescription.setParameterFromObject(template);
final TemplateWriter templateWriter = new TemplateWriter(writerContext, xmlWriter, templateDescription,
parentTemplate);
templateWriter.write();
}
catch (ObjectFactoryException ofe)
{
throw new BundleWriterException("Error while preparing the template", ofe);
}