* Mono.Documentation/monodocs2slashdoc.cs: Fix NamespaceSummaries.xml
authorJonathan Pryor <jpryor@novell.com>
Mon, 11 Jan 2010 13:53:22 +0000 (13:53 -0000)
committerJonathan Pryor <jpryor@novell.com>
Mon, 11 Jan 2010 13:53:22 +0000 (13:53 -0000)
  generation to look at the ns-NAMESPACE.xml files, not just
  NAMESPACE.xml files.

svn path=/trunk/mcs/; revision=149304

mcs/tools/mdoc/ChangeLog
mcs/tools/mdoc/Mono.Documentation/monodocs2slashdoc.cs

index a7c58dd31a6c5d5f2a1e1b2286123a0280026ade..77a52cd769171e50a8587db2b92b378c2662f3b2 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-11  Jonathan Pryor <jpryor@novell.com>
+
+       * Mono.Documentation/monodocs2slashdoc.cs: Fix NamespaceSummaries.xml
+         generation to look at the ns-NAMESPACE.xml files, not just
+         NAMESPACE.xml files.
+
 2009-12-03  Jonathan Pryor <jpryor@novell.com>
 
        * Resources/stylesheet.xsl: Add support for generating namespace links
index 54c1e24e9c03199449c7115e1f8435172a800173..190861277f05cb6bb4ba86a092ff8040bcd1ff56 100644 (file)
@@ -133,14 +133,17 @@ public class MDocToMSXDocConverter : MDocCommand {
        }
        
        private static void AddNamespaceSummary(XmlDocument nsSummaries, string basepath, string currentNs) {
-               string filename = Path.Combine(basepath, currentNs + ".xml");
-               if (File.Exists(filename))      {
-                       XmlDocument nsSummary = new XmlDocument();
-                       nsSummary.Load(filename);
-                       XmlElement ns = nsSummaries.CreateElement("namespace");
-                       nsSummaries.DocumentElement.AppendChild(ns);
-                       ns.SetAttribute("name", currentNs);
-                       ns.InnerText = nsSummary.SelectSingleNode("/Namespace/Docs/summary").InnerText;
+               foreach (var filename in new [] {
+                               Path.Combine(basepath, currentNs + ".xml"),
+                               Path.Combine(basepath, "ns-" + currentNs + ".xml")}) {
+                       if (File.Exists(filename))      {
+                               XmlDocument nsSummary = new XmlDocument();
+                               nsSummary.Load(filename);
+                               XmlElement ns = nsSummaries.CreateElement("namespace");
+                               nsSummaries.DocumentElement.AppendChild(ns);
+                               ns.SetAttribute("name", currentNs);
+                               ns.InnerText = nsSummary.SelectSingleNode("/Namespace/Docs/summary").InnerText;
+                       }
                }
        }