Exemplo n.º 1
0
        /// <summary>
        ///     Transforms the output.
        /// </summary>
        /// <returns></returns>
        private string TransformOutput()
        {
            using (var xsltReader = _fileSystemService.CreateXmlReader(_settingsData.TransformFile))
            {
                var transformer = new XslCompiledTransform();
                transformer.Load(xsltReader);

                using (var documentReader = _fileSystemService.CreateXmlReader(_settingsData.OutputFile))
                {
                    var htmlOutput = _fileSystemService.ChangeExtension(_settingsData.OutputFile, ".html");
                    using (var writer = _fileSystemService.CreateXmlWriter(htmlOutput))
                    {
                        transformer.Transform(documentReader, writer);
                        writer.Flush();
                    }

                    return(htmlOutput);
                }
            }
        }