There is no reason why the abstract class DocTransformer cannot hold the context. We can then remove TransformerWithContext