[Mono-docs-list] More monodocer

Jonathan Pryor jonpryor at vt.edu
Sun Oct 8 21:21:11 EDT 2006


On Sun, 2006-10-08 at 18:18 -0400, Joshua Tauberer wrote:
> monodocs2html:
> 
> Include inherited members in the member listing for a type, if the
> type's ancestor types are documented in the same set.

@@ -1182,11 +1241,31 @@
                        <xsl:sort select="Parameters/Parameter/@Type"/>
                        
                        <xsl:variable name="linkid">
+                               <xsl:if test="not(parent::Members/@FullName = $TypeFullName)">
+                                       <xsl:call-template name="GetLinkTarget">
+                                               <xsl:with-param name="type" select="parent::Members/@FullName" />
+                                               <xsl:with-param name="local-suffix"/>
+                                               <xsl:with-param name="remote"/>
+                                               <xsl:with-param name="empty-if-this" select="1"/>
+                                       </xsl:call-template>
+                               </xsl:if>
+
+                               <xsl:text>#</xsl:text>
                                <xsl:call-template name="GetLinkId" >
-                                       <xsl:with-param name="type" select="../.." />
+                                       <xsl:with-param name="type" select="parent::Members" />
                                        <xsl:with-param name="member" select="." />
                                </xsl:call-template>
                        </xsl:variable>
+                       
+                       <xsl:variable name="isinherited">
+                               <xsl:if test="not(parent::Members/@FullName = $TypeFullName)">
+                                       (<i>Inherited from
+                                       <xsl:call-template name="maketypelink">
+                                               <xsl:with-param name="type" select="parent::Members/@FullName"/>
+                                               <xsl:with-param name="wrt" select="$TypeNamespace"/>
+                                       </xsl:call-template>.</i>)
+                               </xsl:if>
+                       </xsl:variable>

You might want to wrap the "(<i>Inherited from..." and ")" within
<xsl:text/> so that extra whitespace isn't introduced in the output
document.

Also, you might want to modify DocTest.cs so that GenericBase`1 has some
members, so that we can see the effect of this option in the regression
tests.

@@ -1197,9 +1276,9 @@
                                        <td>
                                        <div>
                                        <b>
-                                       <a href="#{$linkid}">
+                                       <a href="{$linkid}">

Why'd you get rid of the "#" from the href here and in other spots?  I
don't see any changes in GetLinkId() that would remove the need for
this.

Index: DocTest/html.expected/Mono.DocTest.Generic/MyList`1.html
===================================================================
--- DocTest/html.expected/Mono.DocTest.Generic/MyList`1.html    (revision 66435)
+++ DocTest/html.expected/Mono.DocTest.Generic/MyList`1.html    (working copy)
@@ -98,7 +98,7 @@
               <td>
                 <b>
                   <a href="#M:Mono.DocTest.Generic.MyList`1.GetHelper`2">GetHelper&lt;U,V&gt;</a>
-                </b>()<nobr>:<a href="../Mono.DocTest.Generic/MyList`1+Helper`2.html">MyList&lt;T&gt;.Helper&lt;U,V&gt;</a></nobr><div>To be added.</div></td>
+                </b>()<nobr> : <a href="../Mono.DocTest.Generic/MyList`1+Helper`2.html">MyList&lt;T&gt;.Helper&lt;U,V&gt;</a></nobr><div>To be added.</div></td>
             </tr>
             <tr valign="top">
               <td>
@@ -129,7 +129,7 @@
               </td>
               <td>
                 <b>
-                  <a href="#M:Mono.DocTest.Generic.MyList`1.UseHelper`2(Mono.DocTest.Generic.MyList{`1}.Helper{``1,``2})">UseHelper&lt;U,V&gt;</a>
+                  <a href="#M:Mono.DocTest.Generic.MyList`1.UseHelper`2(Mono.DocTest.Generic.MyList{T}.Helper{``1,``2})">UseHelper&lt;U,V&gt;</a>
                 </b>(<a href="../Mono.DocTest.Generic/MyList`1+Helper`2.html">MyList&lt;T&gt;.Helper&lt;U,V&gt;</a>)<div>To be added.</div></td>
             </tr>
           </table>

Your changes broke something: {T} should continue to be {`1} within the
href="..." text.

 - Jon




More information about the Mono-docs-list mailing list