ContentHandlerWrapper contentHandler = new ContentHandlerWrapper(serializer, serializer);
contentHandler.startDocument();
// TODO is root element necessary for TextSerializer?
contentHandler.startElement(JXTemplateGenerator.NS, elementName, elementName, EMPTY_ATTRS);
Invoker.execute(contentHandler, objectModel, executionContext, macroContext, namespaces, this.getNext(), this
.getEndInstruction());
contentHandler.endElement(JXTemplateGenerator.NS, elementName, elementName);
contentHandler.endDocument();
valueStr = writer.toString();