Add support for XSLCache in the XSLWriter Improvement

Fixes #826