@Override
protected void startNode(Node node) throws TransformerException {
if(node.getNodeType() == NodeImpl.REFERENCE_NODE) {
final SAXSerializer handler = (SAXSerializer) SerializerPool.getInstance().borrowObject(SAXSerializer.class);
handler.setReceiver(receiver);
final Serializer serializer = broker.getSerializer();
serializer.setSAXHandlers(handler, handler);
try {
serializer.setProperties(outputProperties);
serializer.setProperty(Serializer.GENERATE_DOC_EVENTS, "false");
} catch (final SAXNotRecognizedException e) {
//Nothing to do ?
} catch (final SAXNotSupportedException e) {
//Nothing to do ?
}
try {
serializer.toSAX(((ReferenceNode)node).getReference());
} catch (final SAXException e) {
throw new TransformerException(e.getMessage(), e);
} finally {
SerializerPool.getInstance().returnObject(handler);
}