public void initialise() throws InitialisationException
{
if (xquery != null && xqueryFile != null)
{
throw new InitialisationException(XmlMessages.canOnlySetFileOrXQuery(), this);
}
try
{
if (xqueryFile != null)
{
xquery = IOUtils.getResourceAsString(xqueryFile, getClass());
}
if (configuration == null)
{
configuration = new Configuration();
}
XQDataSource ds = new SaxonXQDataSource(configuration);
if (commonHandler != null)
{
ds.setCommonHandler(commonHandler);
}
connection = ds.getConnection();
transformerPool.addObject();
}
catch (Throwable te)
{
throw new InitialisationException(te, this);
}
}