Add support for XSLCache in the XSLWriter Improvement

Fixes #826
Merge pull request #1023 from siad007/patch-4

Fixes #826 "Add support for XSLCache in the XSLWriter"