Author: ben
Date: 2007-11-05 20:12:16 -0800 (Mon, 05 Nov 2007)
New Revision: 7147

Modified:
   openlaszlo/trunk/
   openlaszlo/trunk/docs/includes/docbook.css
   openlaszlo/trunk/docs/includes/styles.css
   openlaszlo/trunk/docs/src/build.xml
   openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
   openlaszlo/trunk/docs/src/xsl/js2doc2dbk/utilities.xsl
   openlaszlo/trunk/docs/src/xsl/refguide-html.xsl
   openlaszlo/trunk/docs/src/xsl/simple-driver.xsl
   openlaszlo/trunk/docs/src/xsl/xref.xsl
Log:
Change 20071105-ben-o by [EMAIL PROTECTED] on 2007-11-05 15:53:39 PST
    in /Users/ben/src/svn/openlaszlo/trunk-for-merging
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Merging a few weeks of work in paperpie into trunk

New Features:

Bugs Fixed:
LPP-4977 Refguide links to developers' guide chapters are wrongly mapped
LPP-4712 should not have two files with the same name and different caps in the 
same directory: lz.html and Lz.html
Incomplete progress on unfiled bugs on the general badness of the attributes 
list in the reference

Technical Reviewer: none (alas! my kingdom for an xslt reviewer!) 
QA Reviewer: frisco (pending)
Doc Reviewer: sundman (pending)

Documentation:
This change makes substantial progress towards making the documentation
presentable again. The major change is to the attributes list reference, 
wherein we're approaching good rules for selecting attribute "category."
The options for attribute category are now initialize-only, read/write, 
read-only, and special. No "special" attributes have yet been discovered.
Many, many attributes are listed in the reference as "(FIXME: otherwise)". 
These are indications to the doc toolsmith (me) that the js2doc comments
in the source are not internally consistent and must be repaired. 
Similarly, "(TODO: declare attribute)" is a sign to the toolsmith that
the doc comments indicate that that attribute should be declared in
the source, but it is not. This situation arises because of swf's
permissiveness with undeclared attributes; the doctools are noticing
problems in the code that have been okay with swf < swf9 and okay
with dhtml, but that swf9 and the doctools will need to be squared
away. 

Release Notes:

Details:

docs/src/xsl/js2doc2dbk.xsl
    Keep track of the attributes for each class as three sets: initialization
    args, instance variables, and setters. Do lots of boolean logic on 
    the members of those sets to figure out what category (read/write, readonly,
    initialize-only, todo/fixme) that attribute should belong in. 
    Change the look of the attribute tables. 
    Show the returns type of methods. 
    Detect files that would be named Lz.html and lz.html; give them more
    different names. 

docbook.css and docs/includes/styles.css: 
    cosmetic changes to make the docs look more okay and more like the 3.4 docs 
   
    
docs/src/build.xml
    Instead of totally blowing away the docbook-generated index, just rename 
it. 
    
docs/src/xsl/js2doc2dbk/utilities.xsl
    More specific errors for when the javascript type is unknown. ?jstype? is
    easier to find in the output than ???

docs/src/xsl/xref.xsl    
    Improve linking between reference guide and developer's guide 
    and tutorials. 

docs/src/xsl/simple-driver.xsl
    figuring out how to build a useful attributes list

docs/src/xsl/refguide-html.xsl
    put back in some templates I had moved out, in paperpie. 
    
Tests:
ant clean build doc
..look at the doc. 




Property changes on: openlaszlo/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7013 
/openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097
 
/openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334
   + /openlaszlo/branches/paperpie:1-6504,6506-6574,6576-7135,7137-7142 
/openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497,6509,6661,7097
 
/openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334

Modified: openlaszlo/trunk/docs/includes/docbook.css
===================================================================
--- openlaszlo/trunk/docs/includes/docbook.css  2007-11-06 04:10:15 UTC (rev 
7146)
+++ openlaszlo/trunk/docs/includes/docbook.css  2007-11-06 04:12:16 UTC (rev 
7147)
@@ -46,7 +46,7 @@
 
 .refsect1 {
     clear: both;
-    margin-top: -5px;
+    margin-top: 5px;
 }
 
 
@@ -167,6 +167,7 @@
 }
 
 .refentry td {
+    font-size: 10px;
     border-bottom-width: 1px;
 }
 

Modified: openlaszlo/trunk/docs/includes/styles.css
===================================================================
--- openlaszlo/trunk/docs/includes/styles.css   2007-11-06 04:10:15 UTC (rev 
7146)
+++ openlaszlo/trunk/docs/includes/styles.css   2007-11-06 04:12:16 UTC (rev 
7147)
@@ -194,6 +194,14 @@
     text-decoration: none;
 }
 
+.informaltable th {
+    background-color: #EEEEEE;
+    color: #1F1F1F;
+    font-size: 11px;
+    font-weight: bold;
+    line-height: 14px;
+}
+
 .chaptertoc {
     float: left;
 }
@@ -358,3 +366,12 @@
     padding-top: 2pt;
     padding-bottom: 2pt;
 }
+
+/* Attributes List ****************** */
+td .literal {
+    font-size: 12px;
+    background-color: #FFFFFF;
+    font-weight: bold; 
+    line-height: 18px;
+    color: #333333;
+}
\ No newline at end of file

Modified: openlaszlo/trunk/docs/src/build.xml
===================================================================
--- openlaszlo/trunk/docs/src/build.xml 2007-11-06 04:10:15 UTC (rev 7146)
+++ openlaszlo/trunk/docs/src/build.xml 2007-11-06 04:12:16 UTC (rev 7147)
@@ -754,12 +754,18 @@
       <echo message="***gonna copy in reference frameset ***" />      
       <!-- To actually build or update the index-generated.html, see 
navbuilder/navbuilder.rb -->
       <copy 
+          verbose="true"
           overwrite="true"         
           file="${reference.src.dir}/navbuilder/index-generated.html" 
           todir="${reference.output.dir}">
       </copy>      
+      <!-- Tuck away the docbook-generated index, so we can examine it --> 
       <copy 
-          overwrite="true"         
+          file="${reference.output.dir}/index.html"
+          tofile="${reference.output.dir}/index-docbook.html">          
+      </copy>      
+      <copy 
+          overwrite="true"
           file="${reference.src.dir}/navbuilder/index-frames.html" 
           tofile="${reference.output.dir}/index.html">
       </copy>

Modified: openlaszlo/trunk/docs/src/xsl/js2doc2dbk/utilities.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/js2doc2dbk/utilities.xsl      2007-11-06 
04:10:15 UTC (rev 7146)
+++ openlaszlo/trunk/docs/src/xsl/js2doc2dbk/utilities.xsl      2007-11-06 
04:12:16 UTC (rev 7147)
@@ -76,7 +76,7 @@
           </xsl:element>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:text>???</xsl:text>
+          <xsl:text>?jstype?</xsl:text>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:template>

Modified: openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl        2007-11-06 04:10:15 UTC 
(rev 7146)
+++ openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl        2007-11-06 04:12:16 UTC 
(rev 7147)
@@ -117,8 +117,24 @@
       <xsl:variable name="desc">
         <xsl:apply-templates select="." mode="desc"/>
       </xsl:variable>
+      
+      <xsl:variable name="id-for-output">
+        <xsl:choose>
+          <xsl:when test="starts-with('lz', $jsname) and 
(string-length($jsname) = 2)">
+            <xsl:message>We found a thing with javascript name "lz" 
sweet!</xsl:message>
+            <xsl:text>lz.pseudopackage</xsl:text>
+          </xsl:when>
+          <xsl:when test="starts-with('Lz', $jsname) and 
(string-length($jsname) = 2)">
+            <xsl:message>We found a thing with javascript name "Lz" 
sweet!</xsl:message>
+            <xsl:text>library.Lz</xsl:text>
+          </xsl:when>
+          <xsl:otherwise><xsl:value-of select="@id"/></xsl:otherwise>
+        </xsl:choose>
         
-      <refentry id="[EMAIL PROTECTED]" xreflabel="{$desc}">
+      </xsl:variable>
+      
+        
+      <refentry id="{$id-for-output}" xreflabel="{$desc}">
         <xsl:if test="$lzxname"><anchor 
id="{concat('tag.',$lzxname)}"/></xsl:if>
         <refmeta>
           <refentrytitle><xsl:value-of select="$desc"/></refentrytitle>
@@ -153,7 +169,7 @@
       <refentry id="[EMAIL PROTECTED]" xreflabel="{$desc}">
         <refnamediv>
           <refname>
-            <filename><xsl:value-of select="$file-path"/></filename>
+            <filename><xsl:value-of select="$file-path"/></filename> 
           </refname>
           <xsl:if test="&shortdesc;">
             <refpurpose>
@@ -185,6 +201,9 @@
 
     <xsl:template match="*" mode="refentry">
     </xsl:template>
+  
+  
+ 
 
     <!-- DESCRIPTION -->
     
@@ -218,6 +237,7 @@
         <xsl:variable name="svars" select="&objectvalue;/[EMAIL 
PROTECTED]'setters']/object/property[&isvisible;]"/>
         <xsl:variable name="pvars" select="&objectvalue;/[EMAIL 
PROTECTED]'prototype']/object/property[&isvisible;]"/>
         <xsl:variable name="ovars" 
select="&objectvalue;/property[not(&privateslot;) and &isvisible;]"/>
+        <xsl:variable name="initargs" 
select="class/initarg[not(contains(@access, 'private'))]" />
         
         <!-- Static Properties -->
         <xsl:if test="$show.properties.static">
@@ -225,6 +245,9 @@
             <xsl:with-param name="members" select="$ovars[not(child::function) 
and not(@type='LzEvent')]"/>
             <xsl:with-param name="static" select="true()"/>
             <xsl:with-param name="title" select="'Static Properties'"/>
+            <xsl:with-param name="initargs" select="$initargs" />
+            <xsl:with-param name="ivars" select="$ivars" />
+            <xsl:with-param name="setters" select="$svars" />
           </xsl:call-template>
         </xsl:if>          
 
@@ -267,11 +290,15 @@
         <!-- Properties -->    
         <xsl:if test="$show.members.attributes">
           <xsl:call-template name="describe-members">
-            <xsl:with-param name="members" select="$ivars | 
&classvalue;/initarg"/>
+            <xsl:with-param name="members" select="$ivars | 
&classvalue;/initarg | $svars"/>
             <xsl:with-param name="title" select="'Attributes'"/>
+            <xsl:with-param name="initargs" select="$initargs" />
+            <xsl:with-param name="ivars" select="$ivars" />
+            <xsl:with-param name="setters" select="$svars" />            
           </xsl:call-template>
         </xsl:if>  
-        
+
+
         <!-- Inherited Attributes -->
         <xsl:if test="$show.inherited.attributes">
           <xsl:call-template name="describe-inherited-attributes">
@@ -364,15 +391,21 @@
     <xsl:param name="subtitle"/>
     <xsl:param name="describe-js" select="boolean(@name)"/>
     <xsl:param name="describe-lzx" select="boolean(&tagname;)"/>
+    <xsl:param name="setters" />
+    <xsl:param name="ivars" />
+    <xsl:param name="initargs"/>
     <xsl:choose>
-      <xsl:when test="$title = 'Attributes'">
+      <xsl:when test="contains($title,  'Attributes')">
         <xsl:call-template name="describe-members-grid">
           <xsl:with-param name="members" select="$members"/>
           <xsl:with-param name="static" select="$static"/>
           <xsl:with-param name="title" select="$title"/>
           <xsl:with-param name="subtitle" select="$subtitle"/>
           <xsl:with-param name="describe-js" select="$describe-js" />
-          <xsl:with-param name="describe-lzx" select="$describe-lzx" />        
  
+          <xsl:with-param name="describe-lzx" select="$describe-lzx" />
+          <xsl:with-param name="setters" select="$setters"/>
+          <xsl:with-param name="ivars" select="$ivars"/>
+          <xsl:with-param name="initargs" select="$initargs"/>          
         </xsl:call-template>  
       </xsl:when>
       <xsl:otherwise>
@@ -419,35 +452,42 @@
     <xsl:param name="subtitle"/>
     <xsl:param name="describe-js" select="boolean(@name)"/>
     <xsl:param name="describe-lzx" select="boolean(&tagname;)"/>
+    <xsl:param name="setters" />
+    <xsl:param name="ivars" />
+    <xsl:param name="initargs" />    
+    
     <xsl:variable name="visible-members" 
select="$members[contains($visibility.filter,@access)]"/>
     <xsl:if test="count($visible-members) > 0">
-      <table frame="none" colsep="0" rowsep="0">
-        <title><xsl:value-of select="$title"/></title>
+      <refsect2><title><xsl:value-of select="$title"/></title>
+      <informaltable frame="none" colsep="0">
         <tgroup cols="4">
           <colspec colname="Name" />
-          <!-- <colspec colname="Usage" /> -->
           <colspec colname="TypeTag" />
           <colspec colname="TypeJS" />
           <colspec colname="Default" />
-          <!-- <colspec colname="Category" /> -->          
+          <colspec colname="Category" />  
           <thead>
             <row>
               <entry align="left">Name</entry>
-              <!-- <entry align="left">Usage</entry> -->
               <entry align="left">Type (tag)</entry>
               <entry align="left">Type (js)</entry>
               <entry align="left">Default</entry>
-              <!-- <entry align="left">Category</entry> -->
+              <entry align="left">Category</entry>
             </row>
           </thead>
           <tbody>
             <xsl:for-each select="$visible-members">
               <xsl:sort select="translate(@name,'_$','  ')"/>
-              <xsl:call-template name="member-data-row"></xsl:call-template>
+              <xsl:call-template name="member-data-row">
+                  <xsl:with-param name="setters" 
select="$setters"></xsl:with-param>
+                  <xsl:with-param name="ivars" 
select="$ivars"></xsl:with-param>
+                  <xsl:with-param name="initargs" 
select="$initargs"></xsl:with-param>                
+              </xsl:call-template>           
             </xsl:for-each>
           </tbody>
         </tgroup>
-      </table>
+      </informaltable>
+      </refsect2>
     </xsl:if>
   </xsl:template>
   
@@ -466,8 +506,8 @@
     </xsl:variable>
     
     <xsl:if test="count($visible-members) > 0">
-      <table frame="none" colsep="0" rowsep="0">
-        <title>Events</title>
+      <refsect2><title>Events</title>
+      <informaltable frame="none" colsep="0" rowsep="0">        
         <tgroup cols="2">
           <colspec colname="Name" />
           <colspec colname="Description" />
@@ -487,28 +527,17 @@
                       <xsl:value-of select="@name"/>
                     </primary>                    
                   </indexterm>
-                  <xsl:value-of select="@name"/>
+                  <literal>
+                    <xsl:value-of select="@name"/>
+                  </literal>
                 </entry>
                 <entry><xsl:value-of select="doc/text" /></entry>
               </row>
             </xsl:for-each>
           </tbody>
         </tgroup>
-      </table>
-      
-      <!-- Also list the event out the old way. This seems to be necessary
-      to get the xref in properly. [bshine 10.11.2007] -->
-      <!--
-      <xsl:for-each select="$visible-members">
-        <xsl:sort select="translate(@name,'_$','  ')"/>        
-        <xsl:apply-templates select="." mode="describe-member">
-          <xsl:with-param name="static" select="$static"/>
-          <xsl:with-param name="describe-js" select="$describe-js"/>
-          <xsl:with-param name="describe-lzx" select="$describe-lzx"/>
-        </xsl:apply-templates>
-      </xsl:for-each>
-      
-      -->
+      </informaltable>      
+      </refsect2>
     </xsl:if>
     
     
@@ -516,6 +545,9 @@
 
     <xsl:template match="initarg|property" mode="describe-member">
       <!-- TO DO: special format for setters (properties with 
../object/../[EMAIL PROTECTED]'setters'] structure) -->
+      <!-- [bshine 11.2.2007] Now I understand what Jim meant with this 
comment! We need to describe
+        attributes specially (in some way) if they are listed as "setters" in 
the js2doc output. 
+        I do not yet understand exactly what to do here. -->
       <xsl:param name="static"/>
       <xsl:param name="describe-js" select="true()"/>
       <xsl:param name="describe-lzx" select="true()"/>
@@ -560,13 +592,13 @@
           </xsl:if>
           <xsl:if test="function/parameter">
             <refsect3>              
-              <table frame="none" colsep="0" rowsep="0">
-                <title><xsl:text>Parameters</xsl:text></title>
+              <informaltable frame="none" colsep="0" rowsep="0" pgwide="1">
                 <tgroup cols="3">
                   <colspec colname="Name" />
                   <colspec colname="Type" />
                   <colspec colname="Description" />          
                   <thead>
+                    <row><entry namest="Name" nameend="Description" 
align="left">Parameters</entry></row>
                     <row>
                       <entry align="left">Name</entry>
                       <entry align="left">Type</entry>
@@ -576,16 +608,39 @@
                   <tbody>
                     <xsl:for-each select="function/parameter">
                       <row>
-                        <entry><xsl:value-of select="@name"/></entry>
+                        <entry><xsl:attribute 
name="class">parametername</xsl:attribute><xsl:value-of select="@name"/></entry>
                         <entry><xsl:value-of select="@type"/></entry>
                         <entry><xsl:value-of select="doc/text"/></entry>
                       </row>                      
                     </xsl:for-each>
                   </tbody>
                 </tgroup>
-              </table>              
+              </informaltable>              
               </refsect3>
           </xsl:if>
+          <xsl:if test="function/returns">
+            <refsect3>
+              <informaltable frame="none" colsep="0" rowsep="0" pgwide="1">    
            
+                <tgroup cols="2">
+                  <colspec colname="Type" />
+                  <colspec colname="Description" />                            
          
+                  <thead>                  
+                    <row><entry namest="Type" nameend="Description" 
align="left">Returns</entry></row>
+                    <row>
+                      <entry align="left">Type</entry>
+                      <entry align="left">Description</entry>
+                    </row>
+                  </thead>
+                  <tbody>
+                    <row>
+                      <entry><xsl:value-of 
select="function/returns/@type"/></entry>
+                      <entry><xsl:value-of 
select="function/returns/doc/text"/></entry>
+                    </row>
+                  </tbody>
+                </tgroup>                  
+              </informaltable>
+            </refsect3>             
+          </xsl:if>          
         </listitem>
       </varlistentry>
     </xsl:template>
@@ -879,37 +934,38 @@
 
     <!-- MISC -->
 
-    <xsl:template name="insert-refinfo">
-      <variablelist>
+  <xsl:template name="insert-refinfo">
+    
+      <xsl:if test="@name">
+        <refsect1>
+          <xsl:text>JavaScript: </xsl:text><xsl:value-of select="@name"/>
+        </refsect1>
+      </xsl:if>
       
-        <xsl:if test="@name">
-          <varlistentry><term>JavaScript: <xsl:value-of 
select="@name"/></term></varlistentry>
-        </xsl:if>
-
-        <xsl:if test="@runtimes">
-          <varlistentry><term>Runtimes: <xsl:value-of 
select="@runtimes"/></term></varlistentry>
-        </xsl:if>
-
-        <xsl:if test="child::class">
-          <refsect1>            
-            <xsl:text>Extends </xsl:text>
-            <xsl:call-template name="describe-superclass-chain">
-              <xsl:with-param name="class" select="child::class"/>
-            </xsl:call-template>
-          </refsect1>
-        </xsl:if>
-        
-<?ignore
+      <xsl:if test="@runtimes">
+        <refsect1>
+          <xsl:text>Runtimes: </xsl:text> <xsl:value-of select="@runtimes"/>
+        </refsect1>              
+      </xsl:if>
+      
+      <xsl:if test="child::class">
+        <refsect1>
+          <xsl:text>Extends </xsl:text>
+          <xsl:call-template name="describe-superclass-chain">
+            <xsl:with-param name="class" select="child::class"/>
+          </xsl:call-template>
+        </refsect1>
+      </xsl:if>
+      
+      <?ignore
         <!-- need to turn path into webapp url, not sure how to do that -->
         <xsl:variable name="path" select="@path"/>
         <xsl:if test="$path and $path != ''">
-          <xsl:variable name="pathurl" select="$pathurl"/>
-          <varlistentry><term>Source: <ulink 
url="{$pathurl}"/></term></varlistentry>
+        <xsl:variable name="pathurl" select="$pathurl"/>
+        <varlistentry><term>Source: <ulink 
url="{$pathurl}"/></term></varlistentry>
         </xsl:if>
-?>        
-      </variablelist>
-
-    </xsl:template>
+      ?>        
+  </xsl:template>
     
     <xsl:template name="classlabel">
       <xsl:choose>
@@ -1062,10 +1118,84 @@
   <xsl:template name="member-data-row">
     <xsl:param name="describe-js" select="true()"/>
     <xsl:param name="describe-lzx" select="true()"/>
+    <xsl:param name="setters"/>
+    <xsl:param name="ivars" />
+    <xsl:param name="initargs" />
     
     <xsl:variable name="jsname" select="@name"/>
     <xsl:variable name="lzxname" select="&tagname;"/>
     <xsl:variable name="name" select="&commonname;"/>
+    
+    <!-- checks for membership in the set of instance variables --> 
+    <xsl:variable name="isinstancevar" select="count ([EMAIL PROTECTED] ) > 
0"/>
+    
+    <!-- checks for memebership in the set of initargs --> 
+    <xsl:variable name="isinitarg" select="count( [EMAIL PROTECTED] ) > 0" />
+    
+    <!-- checks whether a setter exists that sets this attribute. --> 
+    <xsl:variable name="hassetter" select="count( [EMAIL PROTECTED] ) > 0" />
+    
+    <!-- Check whether the current node is a setter. This is different from
+      asking whether it *has* a setter; this refers to its place in the DOM,
+      not just whether it's a member of a set. --> 
+    <xsl:variable name="issetter" select="count( ancestor::[EMAIL 
PROTECTED]'setters'] ) > 0" />           
+    
+    
+    
+    
+    <xsl:choose>
+      <xsl:when test="$hassetter and not($issetter) and $isinstancevar">
+        <!-- If there is a setter, but this isn't it, then show this one's 
doc. 
+          This makes use show the instance variable, not the setter, because
+          the instance variable usually has better doc. --> 
+        <xsl:call-template name="unique-attribute">
+          <xsl:with-param name="issetter" select="false()"></xsl:with-param>
+          <xsl:with-param name="isinstancevar" 
select="$isinstancevar"></xsl:with-param>
+          <xsl:with-param name="isinitarg" 
select="$isinitarg"></xsl:with-param>                        
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="$hassetter and $issetter and $isinstancevar">
+        <!-- This is the setter that goes with an instance variable. 
+          Don't output it, because we just want to show the instance variable, 
+          not the setter. --> 
+      </xsl:when>
+      <xsl:when test="$hassetter and not($issetter) and not($isinstancevar)">
+        <!-- TROUBLE. If we've got a setter, but this isn't it, then this 
should 
+          be an instance variable. Otherwise it's weird. We'll output it 
+          as a non-setter attribute, and see what happens. 
+        I suspect this is where LzView.clip and LzView.stretches go. -->
+        <xsl:message>Warning on attribute list in member-data-row: 
+          <xsl:value-of select="$jsname"/> has a setter, but is neither a 
setter nor an instance variable.
+        </xsl:message>
+        <xsl:call-template name="unique-attribute">
+          <xsl:with-param name="issetter" select="$issetter"></xsl:with-param>
+          <xsl:with-param name="isinstancevar" 
select="$isinstancevar"></xsl:with-param>
+          <xsl:with-param name="isinitarg" 
select="$isinitarg"></xsl:with-param>                        
+        </xsl:call-template>        
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- This handles all the cases where there is no setter. It's easy, 
we just
+          pass it through to the unique-attribute template. (If an attribute 
does
+          turn up more than once, then it's an error of a kind we haven't 
thought of yet.
+          Maybe initarg.
+        -->
+        <xsl:call-template name="unique-attribute">
+          <xsl:with-param name="issetter" select="$issetter"></xsl:with-param>
+          <xsl:with-param name="isinstancevar" 
select="$isinstancevar"></xsl:with-param>
+          <xsl:with-param name="isinitarg" 
select="$isinitarg"></xsl:with-param>
+        </xsl:call-template>                            
+      </xsl:otherwise>
+      </xsl:choose>
+  </xsl:template>
+    
+  <xsl:template name="unique-attribute">
+    <xsl:param name="issetter" select="false()"></xsl:param>
+    <xsl:param name="isinstancevar" select="true()"></xsl:param>
+    <xsl:param name="isinitarg" select="false()"></xsl:param>        
+
+    <xsl:variable name="jsname" select="@name"/>
+    <xsl:variable name="lzxname" select="&tagname;"/>
+    <xsl:variable name="name" select="&commonname;"/>    
     <xsl:variable name="sortasname" select="translate($name,'_$','  ')"/>
     <xsl:variable name="id" select="@id"/>
     <xsl:variable name="desc">
@@ -1075,7 +1205,7 @@
     <xsl:variable name="xref">
       <xsl:apply-templates select="." mode="xref"/>
     </xsl:variable>
-    
+        
     <term id="[EMAIL PROTECTED]" xreflabel="{$xref}">
       <!-- how to get the indexterm to use a different name than xreflabel? -->
       <indexterm zone="[EMAIL PROTECTED]">
@@ -1089,8 +1219,12 @@
       <xsl:value-of select="$desc"/>
     </term>    
     <row>
-      <entry><xsl:value-of select="@name"/></entry>
-      <!-- "Usage" will go here <entry>(unknown)</entry> -->
+      <xsl:if test="not (doc/text)">
+        <xsl:attribute name="rowsep">0</xsl:attribute>
+      </xsl:if>
+      <entry><literal>
+        <xsl:value-of select="@name"/>
+      </literal></entry>
       <entry><xsl:value-of select="&lzxtype;" /> </entry>
       <entry>
         <xsl:call-template name="jstype">
@@ -1098,26 +1232,36 @@
         </xsl:call-template>
       </entry>
       <entry><xsl:value-of select="&lzxdefault;" /></entry>
-      <!-- Category will go here 
-      <entry> 
+      <!-- The code here begins to implement the "new" specification for 
+        describing attribute categories: read-only, read/write, 
initialize-only, 
+        and special. 
+        The breakdown implemented below does not print those keywords, 
+        because (now that I'm writing the code) those keywords don't seem
+        to entirely fit. Or maybe they fit but I can't figure out how to
+        map what I know about the attributes to those keywords. I am 
+        here printing out what I think is useful information from the
+        metadata about these attributes that I do have.
+        [bshine 2007.11.04]
+        -->
+      <entry>
         <xsl:choose>
-          <xsl:when test="initarg">
-            <xsl:text>initarg</xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-          </xsl:otherwise>
-        </xsl:choose>        
+          <xsl:when test="@modifiers = 'final'">initialize-only</xsl:when>
+          <xsl:when test="$isinstancevar and not(@modifiers = 
'final')">read/write</xsl:when>
+          <xsl:when test="not($isinstancevar) and $issetter">(TODO: declare 
attribute)</xsl:when>          
+          <xsl:otherwise>(FIXME: otherwise)</xsl:otherwise>
+        </xsl:choose>
+        
+        <xsl:if test="$isinitarg"> (initarg) </xsl:if>                         
            
       </entry>
-      -->
     </row>
     <xsl:if test="doc/text">  
-      <row>
-        <entry namest="TagType" nameend="Category">
+      <row rowsep="1">
+        <entry namest="TypeTag" nameend="Category">
           <xsl:value-of select="doc/text" />
         </entry>
       </row>
     </xsl:if>        
     
   </xsl:template>
-  
+ 
 </xsl:stylesheet>
\ No newline at end of file

Modified: openlaszlo/trunk/docs/src/xsl/refguide-html.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/refguide-html.xsl     2007-11-06 04:10:15 UTC 
(rev 7146)
+++ openlaszlo/trunk/docs/src/xsl/refguide-html.xsl     2007-11-06 04:12:16 UTC 
(rev 7147)
@@ -20,35 +20,34 @@
 
   <xsl:param name="linenumbering.extension.frag" select="0"/>
 
-    <xsl:template match="refnamediv">
-        <div class="{name(.)}">
-            <xsl:call-template name="dir">
-                <xsl:with-param name="inherit" select="1"/>
-            </xsl:call-template>
-            <xsl:call-template name="anchor"/>
-            <!-- Just show the name of the tag, not "Name: " -->
-            <h2><xsl:apply-templates/></h2>
-        </div>
-    </xsl:template>
+     <xsl:template match="refnamediv">
+          <div class="{name(.)}">
+               <xsl:call-template name="dir">
+                    <xsl:with-param name="inherit" select="1"/>
+               </xsl:call-template>
+               <xsl:call-template name="anchor"/>
+               <!-- Just show the name of the tag, not "Name: " -->
+               <h2><xsl:apply-templates/></h2>
+          </div>
+     </xsl:template>
+     
+     <xsl:template match="refpurpose">
+          <xsl:if test="node()">
+               <div class="refpurpose">
+                    <xsl:apply-templates/>
+               </div>
+          </xsl:if>
+     </xsl:template>
+     
+     <xsl:template match="refsynopsisdiv">
+          <div class="{name(.)}">
+               <xsl:call-template name="dir">
+                    <xsl:with-param name="inherit" select="1"/>
+               </xsl:call-template>
+               <xsl:call-template name="anchor"/>
+               <xsl:apply-templates/>
+          </div>
+     </xsl:template>
 
 
-    <xsl:template match="refpurpose">
-        <xsl:if test="node()">
-            <div class="refpurpose">
-                <xsl:apply-templates/>
-            </div>
-        </xsl:if>
-    </xsl:template>
-
-    <xsl:template match="refsynopsisdiv">
-        <div class="{name(.)}">
-            <xsl:call-template name="dir">
-                <xsl:with-param name="inherit" select="1"/>
-            </xsl:call-template>
-            <xsl:call-template name="anchor"/>
-            <xsl:apply-templates/>
-        </div>
-    </xsl:template>
-
-
 </xsl:stylesheet>
\ No newline at end of file

Modified: openlaszlo/trunk/docs/src/xsl/simple-driver.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/simple-driver.xsl     2007-11-06 04:10:15 UTC 
(rev 7146)
+++ openlaszlo/trunk/docs/src/xsl/simple-driver.xsl     2007-11-06 04:12:16 UTC 
(rev 7147)
@@ -21,32 +21,94 @@
 
 <!ENTITY isvisible      '(contains($visibility.filter, @access))'>
 
+<!ENTITY ispublic       '(@access="public")'>
 
+
+
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
-    <xsl:import  href="common-html.xsl"/>
-    
     <xsl:output method="xml"/>
     <!-- simple driver for testing paperpie doctools work -->
     
+    <xsl:template match="/">
+        <xsl:apply-templates select="/js2doc/property" />
+    </xsl:template>
     
-    <xsl:param name="visibility.filter" select="'public'"/>    
+    
+    
+    <!-- /js2doc/[EMAIL PROTECTED]/class/[EMAIL PROTECTED]"setters"] --> 
+    <xsl:template match="property" >
+        <xsl:variable name="classname" select="@name" />
+        <xsl:variable name="setters" select="class/[EMAIL 
PROTECTED]'setters']/object/property[not(contains(@access, 'private'))]" />
+        <xsl:variable name="instancevariables" select="class/[EMAIL 
PROTECTED]'__ivars__']/object/property[not(contains(@access, 'private'))]" />
+        <xsl:variable name="initargs" 
select="class/initarg[not(contains(@access, 'private'))]" />
+        
+        
+        property with name <xsl:value-of select="$classname"/>
+        
+            
+        <!-- things that are both instancevariables and setters are read/write 
attributes -->
+        <xsl:variable name="setters-names" select="$setters/@name" />
+        <xsl:variable name="ivars-names" select="$instancevariables/@name" />
+        
+        <xsl:variable name="attributes" select="$setters | 
$instancevariables"></xsl:variable>
+        
 
-    <xsl:key name="id" match="*" use="@id"/>
-    <xsl:key name="unitid" match="*" use="@unitid"/>
-    <xsl:key name="topic" match="property" use="@topic"/>
-    <xsl:key name="subtopic" match="property" use="@subtopic"/>
-    <xsl:key name="name-js" match="property" use="@name"/>
-    <xsl:key name="name-lzx" match="property" use="&tagname;"/>
-    <xsl:key name="superclass" match="property[child::class]" 
use="class/@extends"/>    
+        attributes: (setters: <xsl:value-of select="count($setters)"/>) 
(instancevariables: <xsl:value-of select="count($instancevariables)"/>)
+        <xsl:for-each select="$attributes">
+            <xsl:sort select="@name" />
+            <xsl:variable name="sname" select="@name" />
+            <xsl:variable name="issetter" select="count( ancestor::[EMAIL 
PROTECTED]'setters'] ) > 0" />           
+            <xsl:variable name="hassetter" select="count( [EMAIL PROTECTED] ) 
> 0" />
+            <xsl:variable name="isinstancevar" select="count( [EMAIL 
PROTECTED]) > 0" />
+            <xsl:variable name="isinitarg" select="count( [EMAIL PROTECTED] ) 
> 0" />         
+            
+            <xsl:if test="$hassetter">
+                <xsl:if test="$issetter">
+                    <xsl:call-template name="unique-attribute">
+                        <xsl:with-param name="issetter" 
select="true()"></xsl:with-param>
+                        <xsl:with-param name="isinstancevar" 
select="$isinstancevar"></xsl:with-param>
+                        <xsl:with-param name="isinitarg" 
select="$isinitarg"></xsl:with-param>                        
+                    </xsl:call-template>
+                </xsl:if>                
+            </xsl:if>
+            <xsl:if test="not($hassetter)">
+                <xsl:call-template name="unique-attribute"></xsl:call-template>
+            </xsl:if>
+        </xsl:for-each>
+        
+        
+        instancevariables: 
+        <xsl:for-each select="$instancevariables">
+            <xsl:sort select="@name" />            
+            <xsl:value-of select="@name"/>,             
+        </xsl:for-each>            
 
-    <xsl:template match="/">
-        <xsl:for-each select="descendant::refsect1[1]">
-            $relative.path.to.lpshome: <xsl:value-of 
select="$relative.path.to.lpshome"/>
-            local.lps.path:<xsl:call-template name="local.lps.path" />
-            base.book.name:<xsl:call-template name="base.book.name" />
-            dbhtml-dir <xsl:call-template 
name="dbhtml-dir"></xsl:call-template>
-        </xsl:for-each>            
+        initargs: 
+        <xsl:for-each select="$initargs">
+            <xsl:sort select="@name" />            
+            <xsl:value-of select="@name"/>,             
+        </xsl:for-each>         
     </xsl:template>
+
+
+    <xsl:template name="unique-attribute">
+        <xsl:param name="issetter" select="false()"></xsl:param>
+        <xsl:param name="isinstancevar" select="true()"></xsl:param>
+        <xsl:param name="isinitarg" select="false()"></xsl:param>        
+        <xsl:value-of select="@name"/>            
         
+        <xsl:if test="$isinstancevar and $issetter"> (read/write)</xsl:if>
+        <xsl:if test="$isinstancevar and not($issetter)"> (readonly)</xsl:if>
+        <xsl:if test="not($isinstancevar) and $issetter"> (virtual) </xsl:if>
+        <xsl:if test="not($isinstancevar) and not($issetter)"> 
(strange)</xsl:if>
+        <xsl:if test="@modifiers='final'"> (final)</xsl:if>
+        <!-- 
+        <xsl:if test="$isinstancevar"> (instancevariable) </xsl:if>        
+        <xsl:if test="not($isinstancevar)"> (virtual) </xsl:if>
+        -->
+        <xsl:if test="$isinitarg"> (initarg)</xsl:if>,                         
       
+    </xsl:template>
+    
+
 </xsl:stylesheet>

Modified: openlaszlo/trunk/docs/src/xsl/xref.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/xref.xsl      2007-11-06 04:10:15 UTC (rev 
7146)
+++ openlaszlo/trunk/docs/src/xsl/xref.xsl      2007-11-06 04:12:16 UTC (rev 
7147)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <!DOCTYPE xsl:stylsheet [
@@ -40,16 +40,16 @@
           <xsl:value-of select="concat($lpsdir, 'demos/')"/>
         </xsl:when>
         <xsl:when test="$key = 'dguide'">
-          <xsl:value-of select="concat($docsdir, 'guide/')"/>
+          <xsl:value-of select="concat($docsdir, 'developers/')"/>
         </xsl:when>
         <xsl:when test="$key = 'deploy'">
-          <xsl:value-of select="concat($docsdir, 'deploy/')"/>
+          <xsl:value-of select="concat($docsdir, 'deployers/')"/>
         </xsl:when>
         <xsl:when test="$key = 'design'">
-          <xsl:value-of select="concat($docsdir, 'design/')"/>
+          <xsl:value-of select="concat($docsdir, 'designers/')"/>
         </xsl:when>
         <xsl:when test="$key = 'develop'">
-          <xsl:value-of select="concat($docsdir, 'guide/')"/>
+          <xsl:value-of select="concat($docsdir, 'developers/')"/>
         </xsl:when>
         <xsl:when test="$key = 'examples'">
           <xsl:value-of select="concat($lpsdir, 'examples/')"/>
@@ -58,7 +58,7 @@
           <xsl:value-of select="$reference.dir"/>
         </xsl:when>
         <xsl:when test="$key = 'tutorials'">
-          <xsl:value-of select="concat($docsdir, 'guide/')"/>
+          <xsl:value-of select="concat($docsdir, 'developers/tutorials/')"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:message terminate="yes">


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to