[Laszlo-checkins] r10166 - in openlaszlo/trunk/docs: includes src/xsl

dda@openlaszlo.org dda at openlaszlo.org
Tue Jul 1 18:07:03 PDT 2008


Author: dda
Date: 2008-07-01 18:06:56 -0700 (Tue, 01 Jul 2008)
New Revision: 10166

Modified:
   openlaszlo/trunk/docs/includes/styles.css
   openlaszlo/trunk/docs/src/xsl/common-html.xsl
   openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
Log:
Change 20080701-dda-9 by dda at lester.local on 2008-07-01 20:56:36 EDT
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Basic functionality for @deprecated

New Features:

Bugs Fixed: LPP-6115 (reference: @deprecated not handled properly), LPP-5991 (@deprecated not recognized by doctool?)

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)

Documentation:

Release Notes:

Details:
    The basic functionality for @deprecated is available:
    classes, methods, events and attributes can be marked with:
     @deprecated some text.
    Anything currently marked as '@keywords deprecated' should
    shift back to using @deprecated directly.

    As proof of concept, the stylesheet associated with deprecated
    is set up to create a pink background, obviously, this can be changed.

Tests:
    Added fake deprecation to classes, methods, events, attributes
    and checked .html files after building.



Modified: openlaszlo/trunk/docs/includes/styles.css
===================================================================
--- openlaszlo/trunk/docs/includes/styles.css	2008-07-02 01:05:23 UTC (rev 10165)
+++ openlaszlo/trunk/docs/includes/styles.css	2008-07-02 01:06:56 UTC (rev 10166)
@@ -245,7 +245,7 @@
     font-weight: bold;
 }
 
-.note, .warning, .todo, .fixme {
+.note, .warning, .todo, .fixme, .caution {
     border-top: 1px solid;
     border-bottom: 1px solid;
     margin-left: 0.5in; 
@@ -255,6 +255,15 @@
     min-height: 54px;
 }
 
+.caution, .caution table tbody tr th {
+    background-color: pink;
+}
+
+.caution table tbody tr th {
+    font-size: 12px;
+    font-weight: bold;
+}
+
 .todo, .fixme {
     background-color: yellow;
 }

Modified: openlaszlo/trunk/docs/src/xsl/common-html.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/common-html.xsl	2008-07-02 01:05:23 UTC (rev 10165)
+++ openlaszlo/trunk/docs/src/xsl/common-html.xsl	2008-07-02 01:06:56 UTC (rev 10166)
@@ -307,6 +307,12 @@
     </div>
   </xsl:template>
   
+  <xsl:template match="important[@role='deprecated']">
+    <div class="deprecated">
+      <xsl:apply-imports/>
+    </div>
+  </xsl:template>
+  
   <xsl:template name="get-canvas-attribute">
     <xsl:param name="text"/>
     <xsl:param name="attribute"/>

Modified: openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl	2008-07-02 01:05:23 UTC (rev 10165)
+++ openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl	2008-07-02 01:06:56 UTC (rev 10166)
@@ -222,9 +222,6 @@
     <xsl:template match="*" mode="refentry">
     </xsl:template>
 
-
-
-
     <!-- DESCRIPTION -->
 
     <xsl:template name="declaration-description">
@@ -238,6 +235,7 @@
           <xsl:apply-templates select="doc/text" mode="doc2dbk"/>
         </refsect1>
       </xsl:if>
+      <xsl:call-template name="deprecated-item"><xsl:with-param name="kind" select="'class'"/></xsl:call-template>
       <xsl:if test="$show.devnotes and doc/tag[@name='devnote']">
         <refsect1><title>Development Note</title>
           <xsl:apply-templates select="doc/tag[@name='devnote']/text" mode="doc2dbk"/>
@@ -600,7 +598,7 @@
                       </literal>
                     </entry>
                     <!-- Important this appears on one line see: http://www.docbook.org/tdg/en/html/entry.html -->
-                    <entry><xsl:apply-templates select="doc/text" mode="doc2dbk"/></entry>
+                    <entry><xsl:call-template name="deprecated-item"><xsl:with-param name="kind" select="'event'"/></xsl:call-template><xsl:apply-templates select="doc/text" mode="doc2dbk"/></entry>
                   </row>
                 </xsl:for-each>
               </tbody>
@@ -665,6 +663,7 @@
                 <xsl:with-param name="language" select="'javascript'" />
               </xsl:apply-templates>
             </refsect3>
+            <xsl:call-template name="deprecated-item"><xsl:with-param name="kind" select="'method'"/></xsl:call-template>
           <xsl:if test="doc/text">
             <refsect3>
               <xsl:apply-templates select="doc/text" mode="doc2dbk"/>
@@ -841,43 +840,6 @@
 
     <!-- REFENTRY HELPERS -->
 
-    <!-- This template is unused. [bshine 2007.11.16] -->
-    <xsl:template name="describe-parameters">
-      <segmentedlist>
-        <title>Parameters</title>
-        <xsl:processing-instruction name="dbhtml">list-presentation="table"</xsl:processing-instruction>
-        <segtitle>Name</segtitle>
-        <segtitle>Type</segtitle>
-        <segtitle>Desc</segtitle>
-        <xsl:for-each select="parameter">
-          <seglistitem>
-              <seg>
-                <xsl:value-of select="@name"/>
-              </seg>
-              <seg>
-                <xsl:if test="@type"><type role="javascript"><xsl:value-of select="@type"/></type></xsl:if>
-              </seg>
-              <seg>
-              <xsl:if test="doc/text">
-                <xsl:apply-templates select="doc/text" mode="doc2dbk"/>
-              </xsl:if>
-              </seg>
-          </seglistitem>
-        </xsl:for-each>
-        <xsl:if test="returns">
-          <seglistitem>
-            <seg><emphasis>Returns</emphasis></seg>
-            <seg><type role="javascript"><xsl:value-of select="@type"/></type></seg>
-            <seg>
-            <xsl:if test="returns/doc/text">
-              <xsl:apply-templates select="returns/doc/text" mode="doc2dbk"/>
-            </xsl:if>
-            </seg>
-          </seglistitem>
-        </xsl:if>
-      </segmentedlist>
-    </xsl:template>
-
     <xsl:template name="describe-superclass-chain">
       <xsl:param name="class"/>
       <xsl:call-template name="describe-superclass-chain-inner">
@@ -952,6 +914,15 @@
     </xsl:if>
     </xsl:template>
 
+    <xsl:template name="deprecated-item">
+      <xsl:param name="kind"/>
+      <xsl:if test="doc/tag[@name='deprecated']">
+        <caution role="deprecated"><title><xsl:value-of select="concat('This ', $kind, ' is deprecated')"/></title>
+          <xsl:apply-templates select="doc/tag[@name='deprecated']/text" mode="doc2dbk"/>
+        </caution>
+      </xsl:if>
+    </xsl:template>
+
     <!-- ACCESS -->
 
     <xsl:template match="*[not(@access)]" mode="access">
@@ -1582,7 +1553,7 @@
     <row rowsep="1">
       <entry role="attrdesc">&nbsp;</entry>
       <!-- Important this appears on one line see: http://www.docbook.org/tdg/en/html/entry.html -->
-      <entry role="attrdesc" namest="TypeTag" nameend="Category"><xsl:if test="doc/text"><xsl:apply-templates select="doc/text" mode="doc2dbk"/></xsl:if></entry>
+      <entry role="attrdesc" namest="TypeTag" nameend="Category"><xsl:call-template name="deprecated-item"><xsl:with-param name="kind" select="'attribute'"/></xsl:call-template><xsl:if test="doc/text"><xsl:apply-templates select="doc/text" mode="doc2dbk"/></xsl:if></entry>
     </row>
   </xsl:template>
 



More information about the Laszlo-checkins mailing list