[Laszlo-checkins] r6770 - openlaszlo/branches/paperpie/docs/src/xsl

ben@openlaszlo.org ben at openlaszlo.org
Tue Oct 9 11:44:29 PDT 2007


Author: ben
Date: 2007-10-09 11:44:27 -0700 (Tue, 09 Oct 2007)
New Revision: 6770

Modified:
   openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl
   openlaszlo/branches/paperpie/docs/src/xsl/simple-driver.xsl
Log:
added code to list 'initialization arguments' like LzText.password to list of inherited attributes

Modified: openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl	2007-10-09 16:37:23 UTC (rev 6769)
+++ openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl	2007-10-09 18:44:27 UTC (rev 6770)
@@ -758,10 +758,15 @@
           </link>
         </title>
         <para>
-          <xsl:variable name="inheritedattrs" select="$superclass/class/property[@name='__ivars__']/object/property[@access='public']"></xsl:variable>          
+          <xsl:variable name="inheritedattrs" select="$superclass/class/property[@name='__ivars__']/object/property[@access='public']"></xsl:variable>
+          <xsl:variable name="initargs" select="$superclass/class/initarg[@access='public']"></xsl:variable>                                      
           <xsl:for-each select="$inheritedattrs">     
             <link linkend="{@id}"><xsl:value-of select="@name"/></link>
             <xsl:text>, </xsl:text>
+          </xsl:for-each>
+          <xsl:for-each select="$initargs">     
+            <link linkend="{@id}"><xsl:value-of select="@name"/></link>
+            <xsl:text>, </xsl:text>
           </xsl:for-each>                               
         </para>
       </refsect2>                  

Modified: openlaszlo/branches/paperpie/docs/src/xsl/simple-driver.xsl
===================================================================
--- openlaszlo/branches/paperpie/docs/src/xsl/simple-driver.xsl	2007-10-09 16:37:23 UTC (rev 6769)
+++ openlaszlo/branches/paperpie/docs/src/xsl/simple-driver.xsl	2007-10-09 18:44:27 UTC (rev 6770)
@@ -55,14 +55,45 @@
 
     <xsl:template match="class">
         <xsl:if test="attribute::extends != ''">
+<!--            
+            <xsl:call-template name="describe-inherited-initargs">
+                <xsl:with-param name="class" select="."/>
+            </xsl:call-template>
+-->          
+<!--            
             <xsl:call-template name="describe-superclass-methods">
                 <xsl:with-param name="class" select="."/>
-            </xsl:call-template>            
+            </xsl:call-template>
+-->            
             <xsl:call-template name="describe-superclass-chain-inner">
                 <xsl:with-param name="class" select="."/>
             </xsl:call-template>
+        </xsl:if>    
+    </xsl:template>
+    
+    <xsl:template name="describe-inherited-initargs">
+        <xsl:param name="class" />
+        <xsl:variable name="extends" select="$class/@extends"/>
+        <xsl:variable name="superclass" select="(key('id',$extends) | key('name-lzx',$extends))[1]"/>
+        <xsl:if test="$superclass">
+            <xsl:variable name="initargs" select="$superclass/class/initarg[@access='public']"></xsl:variable>            
+            <refsect2>
+                <title>
+                    <xsl:text>Initialization Arguments Inherited From </xsl:text>
+                    <xref linkend="{$superclass/@id}">
+                        <xsl:value-of select="$superclass/doc/tag[@name='lzxname']/text"/>
+                    </xref>
+                </title>                
+                <para>
+                    <xsl:for-each select="$initargs">
+                        <link linkend="{@id}"><xsl:value-of select="@name"/></link>
+                        <xsl:text>, </xsl:text>
+                    </xsl:for-each>
+                </para>
+                
+            </refsect2>
         </xsl:if>
-    
+        
     </xsl:template>
 
     <xsl:template name="describe-superclass-chain-inner">
@@ -76,12 +107,14 @@
         <xsl:if test="$superclass">
             <div>
                 <xsl:variable name="inheritedattrs" select="$superclass/class/property[@name='__ivars__']/object/property[@access='public']"></xsl:variable>
+                <xsl:variable name="initargs" select="$superclass/class/initarg[@access='public']"></xsl:variable>                            
                 <xsl:text>Attributes inherited from&nbsp;</xsl:text>
                 <xref linkend="{$superclass/@id}">
                     <xsl:value-of select="$superclass/doc/tag[@name='lzxname']/text"/>
                 </xref>
                 <xsl:text>: &nbsp;</xsl:text>
-                <xsl:for-each select="$inheritedattrs"><xsl:value-of select="@name"/> <xref linkend="{$superclass/@id}"/> &nbsp;</xsl:for-each>                               
+                <xsl:for-each select="$inheritedattrs"><xsl:value-of select="@name"/> <xref linkend="{$superclass/@id}"/> &nbsp;</xsl:for-each>
+                <xsl:for-each select="$initargs"><xsl:value-of select="@name"/> <link linkend="{@id}"/> &nbsp;</xsl:for-each>                
             </div>
             <xsl:choose>
                 <xsl:when test="contains($visibility.filter, $superclass/@access)">
@@ -98,6 +131,7 @@
     </xsl:template>
             
     <xsl:template name="describe-superclass-methods">
+<!--        
         <xsl:param name="class"/>        
         
         <xsl:variable name="jsname" select="@name"/>
@@ -127,6 +161,7 @@
                 </xsl:otherwise>
             </xsl:choose>
         </xsl:if>        
+-->        
     </xsl:template>
     
 </xsl:stylesheet>



More information about the Laszlo-checkins mailing list