serializer.reset();
Receiver receiver = new ReceiverToSAX(handler);
try {
serializer.setProperties(serializationProps);
if (expandXIncludes) {
XIncludeFilter xinclude = new XIncludeFilter(serializer, receiver);
String xipath = serializationProps.getProperty(EXistOutputKeys.XINCLUDE_PATH);
if (xipath != null) {
final File f = new File(xipath);
if (!f.isAbsolute())
{xipath = new File(context.getModuleLoadPath(), xipath).getAbsolutePath();}
} else
{xipath = context.getModuleLoadPath();}
xinclude.setModuleLoadPath(xipath);
receiver = xinclude;
}
serializer.setReceiver(receiver);
serializer.toSAX(inputNode, 1, inputNode.getItemCount(), false, false);
} catch (final Exception e) {