reverted to StaxWriter as XMLStreamWriterImpl proved to be impossible to hack around