Author: jonpryor
Date: 2008-01-02 11:53:11 -0500 (Wed, 02 Jan 2008)
New Revision: 92116

Modified:
   trunk/monodoc/engine/ChangeLog
   trunk/monodoc/engine/ecma-provider.cs
Log:
        * ecma-provider.cs: Look for namespace docs in both ns-<Namespace>.xml 
and
          <Namespace>.xml files (the former is current monodocer output, the 
latter
          is "legacy" output).


Modified: trunk/monodoc/engine/ChangeLog
===================================================================
--- trunk/monodoc/engine/ChangeLog      2008-01-02 16:48:25 UTC (rev 92115)
+++ trunk/monodoc/engine/ChangeLog      2008-01-02 16:53:11 UTC (rev 92116)
@@ -1,3 +1,9 @@
+2008-01-02  Jonathan Pryor  <[EMAIL PROTECTED]>
+
+       * ecma-provider.cs: Look for namespace docs in both ns-<Namespace>.xml 
and
+         <Namespace>.xml files (the former is current monodocer output, the 
latter
+         is "legacy" output).
+
 2007-12-18  Jonathan Pryor  <[EMAIL PROTECTED]>
 
        * mono-ecma.xsl: 

Modified: trunk/monodoc/engine/ecma-provider.cs
===================================================================
--- trunk/monodoc/engine/ecma-provider.cs       2008-01-02 16:48:25 UTC (rev 
92115)
+++ trunk/monodoc/engine/ecma-provider.cs       2008-01-02 16:53:11 UTC (rev 
92116)
@@ -33,7 +33,7 @@
 //
 // Helper routines to extract information from an Ecma XML document
 //
-public class EcmaDoc {
+public static class EcmaDoc {
        public static string GetFullClassName (XmlDocument doc)
        {
                return doc.SelectSingleNode ("/Type").Attributes 
["FullName"].InnerText;
@@ -130,6 +130,14 @@
                
                return type;
        }
+
+       internal static string GetNamespaceFile (string dir, string ns)
+       {
+               string nsxml = Path.Combine (dir, "ns-" + ns + ".xml");
+               if (!File.Exists (nsxml))
+                       nsxml = Path.Combine (dir, ns + ".xml");
+               return nsxml;
+       }
 }
 
 //
@@ -169,7 +177,7 @@
                                        tn = Path.GetFileName (ns);
                                        Console.Error.WriteLine ("Processing 
namespace {0}", tn);
                                        ns_node = tree.LookupNode (tn, "N:" + 
tn);
-                                       string ns_summary_file = basedir + "/" 
+ tn + ".xml";
+                                       string ns_summary_file = 
EcmaDoc.GetNamespaceFile (basedir, tn);
                                        
                                        nsnodes[ns_node] = nsnodes;
                                        
@@ -1938,7 +1946,7 @@
        
        protected override XmlReader GetNamespaceDocument (string ns) {
                XmlDocument nsdoc = new XmlDocument();
-               nsdoc.Load(Path.Combine(basedir.FullName, ns + ".xml"));
+               nsdoc.Load (EcmaDoc.GetNamespaceFile (basedir.FullName, ns));
                
                XmlDocument elements = new XmlDocument();
                XmlElement docnode = elements.CreateElement("elements");

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to