You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
44
external/api-doc-tools/monodoc/Monodoc/generators/html/Toc2Html.cs
vendored
Normal file
44
external/api-doc-tools/monodoc/Monodoc/generators/html/Toc2Html.cs
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Xml.Xsl;
|
||||
using System.Xml.XPath;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Monodoc.Generators.Html
|
||||
{
|
||||
public class Toc2Html : IHtmlExporter
|
||||
{
|
||||
XslTransform transform;
|
||||
|
||||
public Toc2Html ()
|
||||
{
|
||||
transform = new XslTransform ();
|
||||
var assembly = Assembly.GetAssembly (typeof (Toc2Html));
|
||||
var stream = assembly.GetManifestResourceStream ("toc-html.xsl");
|
||||
XmlReader xml_reader = new XmlTextReader (stream);
|
||||
transform.Load (xml_reader, null, null);
|
||||
}
|
||||
|
||||
public string Export (Stream input, Dictionary<string, string> extraArgs)
|
||||
{
|
||||
var output = new StringWriter ();
|
||||
transform.Transform (new XPathDocument (input), null, output, null);
|
||||
return output.ToString ();
|
||||
}
|
||||
|
||||
public string Export (string input, Dictionary<string, string> extraArgs)
|
||||
{
|
||||
var output = new StringWriter ();
|
||||
transform.Transform (new XPathDocument (new StringReader (input)), null, output, null);
|
||||
return output.ToString ();
|
||||
}
|
||||
|
||||
public string CssCode {
|
||||
get {
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user