Beispiel #1
0
        private static void OutputHtml(Project project, XmlOutputter xmlOutputter, Options options)
        {
            StageStopwatch.Restart();
            Report.NewStatus("Generating htmls... ");

            var reader = CreateSourceXml(project, options);

            var preProcess       = new XsltRunner(Path.Combine(EnvVar.ExecPath, "themes", options.ThemeName, "main_pre.xslt"));
            var preProcessResult = preProcess.Run(xmlOutputter.XDocument, Path.GetFullPath(options.OutputDirectory));

            if (options.SaveXmls)
            {
                preProcessResult.Save(EnvVar.XmlOutputPath(options.OutputDirectory, "documentation_file.xml"));
            }

            var htmlOutputter = new XsltRunner(Path.Combine(EnvVar.ExecPath, "themes", options.ThemeName, "main.xslt"));

            htmlOutputter.Run(
                preProcessResult.ToXDocument(),
                Path.GetFullPath(options.OutputDirectory) + EnvVar.Slash,
                new KeyValuePair <string, object>("verbose", Report.Verbose),
                new KeyValuePair <string, object>("source", reader));

            SaveTiming("html-output", StageStopwatch.ElapsedMilliseconds);
            Report.ContinueStatus("Done");
        }
 protected XsltRunnerComponent(XsltRunner xsltRunner)
 {
     _microComponent = xsltRunner;
 }
 public XsltRunnerComponent()
 {
     _microComponent = new XsltRunner();
 }