use of org.apache.camel.builder.xml.XsltBuilder in project camel by apache.
the class XsltAggregationStrategy method initialize.
protected void initialize(CamelContext context) throws Exception {
// set the default property name if not set
this.propertyName = ObjectHelper.isNotEmpty(propertyName) ? propertyName : DEFAULT_PROPERTY_NAME;
// initialize the XsltBuilder
this.xslt = context.getInjector().newInstance(XsltBuilder.class);
if (transformerFactoryClass != null) {
Class<?> factoryClass = context.getClassResolver().resolveMandatoryClass(transformerFactoryClass, XsltAggregationStrategy.class.getClassLoader());
TransformerFactory factory = (TransformerFactory) context.getInjector().newInstance(factoryClass);
xslt.getConverter().setTransformerFactory(factory);
}
if (uriResolver == null) {
uriResolver = new XsltUriResolver(context, xslFile);
}
xslt.setUriResolver(uriResolver);
xslt.setFailOnNullBody(true);
xslt.transformerCacheSize(0);
xslt.setAllowStAX(true);
configureOutput(xslt, output.name());
loadResource(xslFile);
}
Aggregations