blob: d76a0c8755b095cbb4986a99f06c2b0371a064ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
//
// ByMaintainer.cs
//
// Author:
// Sean MacIsaac (sean@ximian.com)
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
using System.IO;
using System.Xml;
using System.Xml.Xsl;
using System.Xml.XPath;
namespace Mono.StatusReporter {
public class ByMaintainer {
static int Main (string[] args) {
XslTransform xslt = new XslTransform ();
xslt.Load ("ByMaintainer.xsl");
//StreamWriter sw = new StreamWriter ("bm/index");
XPathDocument doc = new XPathDocument ("class.xml");
XmlDocument maintainers = new XmlDocument();
maintainers.Load ("maintainers.xml");
XmlNodeList people = maintainers.GetElementsByTagName("person");
foreach (XmlNode node in people) {
string email = node.Attributes.GetNamedItem("email").Value;
string name = node.Attributes.GetNamedItem("name").Value;
//sw.WriteLine ("<li><a href=\"" + email + ".html\">" + email + "</a>");
XmlWriter writer = new XmlTextWriter ("src/" + email, null);
XsltArgumentList xslArg = new XsltArgumentList ();
xslArg.AddParam ("email", "", email);
xslArg.AddParam ("name", "", name);
xslt.Transform (doc, xslArg, writer);
writer.Close ();
}
//sw.Close ();
return 0;
}
}
}
|