XMLFilter cannot be overridden cleanly due to mime type clash
Created by: Anonymous
Original issue 361 created by tol... on 2013-08-15T23:23:59.000Z:
If I want to subclass XMLFilter and use a different MIME type, things don't quite work out. The XMLFilter constructor hard-codes MimeTypeMapper.XML_MIME_TYPE as the mime type for resources created by the filter. But the encoderManager uses the subclass's getMimeType() to create the encoder mapping. This mismatch can result in un-encoded output in target files.
I suggest adding a constructor for subclasses that accepts the overridden mime type. Patch will be attached. An allternate approach would be to hard-code MimeTypeMapper.XML_MIME_TYPE in getEncoderManager. But the first seems more correct to me.