private static StringReader GetXSLReader(string xslName)
{
//-------------------------------------------//
//--- Lookup the document in the database ---//
//-------------------------------------------//
int idx = xslName.LastIndexOf("\\");
if (idx != -1)
xslName = xslName.Substring(idx + 1);
Document document = DocumentManager.GetDocument(xslName.ToLower(), 14);
if (document == null)
throw new Exception(string.Format("Failed to find XSL style sheet {0}", xslName));
LogManager.SourceTrace(SOURCE, string.Format("Loading XSL Style Sheet {0}", xslName));
var xslReader = new StringReader(StringUtils.RemoveByteOrderMarkUTF8(Encoding.UTF8.GetString(document.DocumentContent)));
return xslReader;
}