Author: gert
Date: 2007-06-29 15:58:51 -0400 (Fri, 29 Jun 2007)
New Revision: 81066

Modified:
   trunk/mcs/tools/corcompare/mono-api-diff.cs
   trunk/mcs/tools/corcompare/mono-api.xsl
Log:
* mono-api.xsl: Added support for nested classes.
* mono-api-diff.cs: Renamed element used for nested classes from
nestedclass to class to avoid duplicating templates in xsl.


Modified: trunk/mcs/tools/corcompare/mono-api-diff.cs
===================================================================
--- trunk/mcs/tools/corcompare/mono-api-diff.cs 2007-06-29 19:48:10 UTC (rev 
81065)
+++ trunk/mcs/tools/corcompare/mono-api-diff.cs 2007-06-29 19:58:51 UTC (rev 
81066)
@@ -864,7 +864,7 @@
                        for (int i = 0; i < count; i++) {
                                XMLClass xclass = nested [i];
 
-                               node = document.CreateElement ("nestedclass", 
null);
+                               node = document.CreateElement ("class", null);
                                newNodes.Add (node);
                                AddAttribute (node, "name", xclass.Name);
                                AddAttribute (node, "type", xclass.Type);
@@ -889,7 +889,7 @@
                                        if (c == null || IsMonoTODOAttribute 
(c.Name))
                                                continue;
 
-                                       node = document.CreateElement 
("nestedclass", null);
+                                       node = document.CreateElement ("class", 
null);
                                        newNodes.Add (node);
                                        AddAttribute (node, "name", c.Name);
                                        AddExtra (node);

Modified: trunk/mcs/tools/corcompare/mono-api.xsl
===================================================================
--- trunk/mcs/tools/corcompare/mono-api.xsl     2007-06-29 19:48:10 UTC (rev 
81065)
+++ trunk/mcs/tools/corcompare/mono-api.xsl     2007-06-29 19:58:51 UTC (rev 
81066)
@@ -160,21 +160,7 @@
 
 
        <xsl:template match="namespace/classes">
-               <xsl:apply-templates select="[EMAIL PROTECTED]'interface']">
-                       <xsl:sort select="@name"/>
-               </xsl:apply-templates>
-               <xsl:apply-templates select="[EMAIL PROTECTED]'class']">
-                       <xsl:sort select="@name"/>
-               </xsl:apply-templates>
-               <xsl:apply-templates select="[EMAIL PROTECTED]'struct']">
-                       <xsl:sort select="@name"/>
-               </xsl:apply-templates>
-               <xsl:apply-templates select="[EMAIL PROTECTED]'delegate']">
-                       <xsl:sort select="@name"/>
-               </xsl:apply-templates>
-               <xsl:apply-templates select="[EMAIL PROTECTED]'enum']">
-                       <xsl:sort select="@name"/>
-               </xsl:apply-templates>
+               <xsl:apply-templates />
        </xsl:template>
 
 
@@ -423,8 +409,25 @@
                </div>
        </xsl:template>
 
+       <!-- nested classes -->
+       <xsl:template match="classes">
+               <xsl:apply-templates select="[EMAIL PROTECTED]'interface']">
+                       <xsl:sort select="@name"/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="[EMAIL PROTECTED]'class']">
+                       <xsl:sort select="@name"/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="[EMAIL PROTECTED]'struct']">
+                       <xsl:sort select="@name"/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="[EMAIL PROTECTED]'delegate']">
+                       <xsl:sort select="@name"/>
+               </xsl:apply-templates>
+               <xsl:apply-templates select="[EMAIL PROTECTED]'enum']">
+                       <xsl:sort select="@name"/>
+               </xsl:apply-templates>
+       </xsl:template>
 
-
        <!-- support templates -->
 
        <xsl:template name="ELEMENT">

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

Reply via email to