[Laszlo-checkins] r9150 - openlaszlo/trunk/docs/src/xsl

dda@openlaszlo.org dda at openlaszlo.org
Wed May 14 12:17:42 PDT 2008


Author: dda
Date: 2008-05-14 12:17:36 -0700 (Wed, 14 May 2008)
New Revision: 9150

Modified:
   openlaszlo/trunk/docs/src/xsl/lzx2js2doc.xsl
Log:
Change 20080514-dda-Q by dda at lester.local on 2008-05-14 15:05:01 EDT
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: doc tools now handle (ignore) default parameters in lzx.

New Features:

Bugs Fixed: LPP-5947

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

Documentation:

Release Notes:

Details:
    A lzx component with <method name="setTint" args="v, color, brightness=0">
    is now fixed so that anything after the '=' is thrown away.  Currently we
    are not showing initializers for either lzx or lzs, but the code is now
    organized so this could be done in the future.

Tests:
    Rebuilt docs and look at <basecomponent> for setTint().



Modified: openlaszlo/trunk/docs/src/xsl/lzx2js2doc.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/lzx2js2doc.xsl	2008-05-14 19:17:04 UTC (rev 9149)
+++ openlaszlo/trunk/docs/src/xsl/lzx2js2doc.xsl	2008-05-14 19:17:36 UTC (rev 9150)
@@ -255,22 +255,40 @@
       </doc>
     </xsl:template>
     
-    <!--- precondition: args param has normalized space, is comma-separated -->
+    <!--- precondition: args param has normalized space, is comma-separated,
+          but each param may contain '=' to represent initializer -->
     <xsl:template name="processargs">
       <xsl:param name="args" select="''"/>
       <xsl:choose>
         <xsl:when test="contains($args, ',')">
           <xsl:variable name="first-arg" select="substring-before($args, ',')"/>
-          <parameter name="{normalize-space($first-arg)}"/>
+          <xsl:call-template name="process-one-arg">
+            <xsl:with-param name="arg" select="$first-arg"/>
+          </xsl:call-template>
           <xsl:call-template name="processargs">
             <xsl:with-param name="args" select="substring-after($args,',')"/>
           </xsl:call-template>
         </xsl:when>
         <!-- TO DO: ? handle case where contains($args,' ')? -->
         <xsl:otherwise>
-          <parameter name="{normalize-space($args)}"/>
+          <xsl:call-template name="process-one-arg">
+            <xsl:with-param name="arg" select="$args"/>
+          </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:template>
+
+    <xsl:template name="process-one-arg">
+      <xsl:param name="arg"/>
+      <xsl:choose>
+        <xsl:when test="contains($arg, '=')">
+          <parameter name="{normalize-space(substring-before($arg, '='))}"/>
+          <!-- TODO [dda 2008-05-14] handle initializers for method args -->
+        </xsl:when>
+        <xsl:otherwise>
+          <parameter name="{normalize-space($arg)}"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:template>
     
 </xsl:stylesheet>



More information about the Laszlo-checkins mailing list