[graphic-forms-cvs] r356 - trunk/docs/manual

junrue at common-lisp.net junrue at common-lisp.net
Thu Oct 19 19:15:24 UTC 2006


Author: junrue
Date: Thu Oct 19 15:15:23 2006
New Revision: 356

Modified:
   trunk/docs/manual/gf-data.xsl
   trunk/docs/manual/gf-utils.xsl
   trunk/docs/manual/gfg-symbols.xml
   trunk/docs/manual/gfs-symbols.xml
Log:
replaced refargument template with arg0-arg6 templates

Modified: trunk/docs/manual/gf-data.xsl
==============================================================================
--- trunk/docs/manual/gf-data.xsl	(original)
+++ trunk/docs/manual/gf-data.xsl	Thu Oct 19 15:15:23 2006
@@ -65,24 +65,88 @@
     </xsl:element>
   </xsl:template>
 
-<!--
-  <xsl:template match="description">
-    <xsl:element name="bridgehead">
-      <xsl:attribute name="renderas">sect2</xsl:attribute>
-      description
-    </xsl:element>
+  <xsl:template name="find-arg">
+    <xsl:param name="index"/>
+    <xsl:variable name="raw-text">
+      <xsl:choose>
+        <xsl:when test="../syntax/arguments">
+          <xsl:value-of select="(../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:when test="../../syntax/arguments">
+          <xsl:value-of select="(../../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:when test="../../../syntax/arguments">
+          <xsl:value-of select="(../../../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:when test="../../../../syntax/arguments">
+          <xsl:value-of select="(../../../../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:when test="../../../../../syntax/arguments">
+          <xsl:value-of select="(../../../../../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:when test="../../../../../../syntax/arguments">
+          <xsl:value-of select="(../../../../../../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:when test="../../../../../../../syntax/arguments">
+          <xsl:value-of select="(../../../../../../../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:when test="../../../../../../../../syntax/arguments">
+          <xsl:value-of select="(../../../../../../../../syntax/arguments/argument)[position()=$index]/@name"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:message terminate="yes">
+            <xsl:text>Could not find argument </xsl:text><xsl:value-of select="$index - 1"/>
+          </xsl:message>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <emphasis>
+      <xsl:call-template name="first-word">
+        <xsl:with-param name="raw-text"><xsl:value-of select="$raw-text"/></xsl:with-param>
+      </xsl:call-template>
+    </emphasis>
+  </xsl:template>
 
-    <xsl:element name="para">
-      <xsl:attribute name="role">normal</xsl:attribute>
-      <xsl:apply-templates/>
-    </xsl:element>
+  <xsl:template match="arg0">
+    <xsl:call-template name="find-arg">
+      <xsl:with-param name="index">1</xsl:with-param>
+    </xsl:call-template>
   </xsl:template>
--->
 
-  <xsl:template match="refargument">
-    <xsl:element name="emphasis">
-      <xsl:value-of select="."/>
-    </xsl:element>
+  <xsl:template match="arg1">
+    <xsl:call-template name="find-arg">
+      <xsl:with-param name="index">2</xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template match="arg2">
+    <xsl:call-template name="find-arg">
+      <xsl:with-param name="index">3</xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template match="arg3">
+    <xsl:call-template name="find-arg">
+      <xsl:with-param name="index">4</xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template match="arg4">
+    <xsl:call-template name="find-arg">
+      <xsl:with-param name="index">5</xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template match="arg5">
+    <xsl:call-template name="find-arg">
+      <xsl:with-param name="index">6</xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+
+  <xsl:template match="arg6">
+    <xsl:call-template name="find-arg">
+      <xsl:with-param name="index">7</xsl:with-param>
+    </xsl:call-template>
   </xsl:template>
 
   <xsl:template match="reftopic">
@@ -163,14 +227,9 @@
         <xsl:element name="para">
           <xsl:attribute name="role">normal</xsl:attribute>
           <xsl:element name="emphasis">
-            <xsl:choose>
-              <xsl:when test="contains(@name,' ')">
-                <xsl:value-of select="substring-before(@name,' ')"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="@name"/>
-              </xsl:otherwise>
-            </xsl:choose>
+            <xsl:call-template name="first-word">
+              <xsl:with-param name="raw-text"><xsl:value-of select="@name"/></xsl:with-param>
+            </xsl:call-template>
           </xsl:element>
         </xsl:element>
       </xsl:element>

Modified: trunk/docs/manual/gf-utils.xsl
==============================================================================
--- trunk/docs/manual/gf-utils.xsl	(original)
+++ trunk/docs/manual/gf-utils.xsl	Thu Oct 19 15:15:23 2006
@@ -18,4 +18,16 @@
     <xsl:value-of select="translate($orig-text,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
   </xsl:template>
 
+  <xsl:template name="first-word">
+    <xsl:param name="raw-text"/>
+    <xsl:choose>
+      <xsl:when test="contains($raw-text,' ')">
+        <xsl:value-of select="substring-before($raw-text,' ')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$raw-text"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
 </xsl:stylesheet>

Modified: trunk/docs/manual/gfg-symbols.xml
==============================================================================
--- trunk/docs/manual/gfg-symbols.xml	(original)
+++ trunk/docs/manual/gfg-symbols.xml	Thu Oct 19 15:15:23 2006
@@ -30,7 +30,7 @@
       <argument name=":data">
         <description>
           A <reftopic>gfg:font-data</reftopic> object. If this initarg
-          is specified, then a value for the <refargument>:gc</refargument>
+          is specified, then a value for the :gc
           initarg is also required.
         </description>
       </argument>
@@ -38,7 +38,7 @@
         <description>
           A <reftopic>gfg:graphics-context</reftopic> object. If this
           initarg is specified, then a value for the
-          <refargument>:data</refargument> initarg is also required.
+          :data initarg is also required.
         </description>
       </argument>
       <argument name=":handle">
@@ -125,7 +125,7 @@
           that the ICO format can store multiple images, all of which will be loaded.
           Since icon-bundle needs a transparency mask for each image in order to create
           Windows icons, a value may be supplied for the
-          <refargument>:transparency-pixel</refargument> initarg of this class;
+          :transparency-pixel initarg of this class;
           otherwise, the pixel color at location (0, 0) in each image is used by
           default.
         </description>
@@ -137,7 +137,7 @@
           the application may either SETF <reftopic>gfg:transparency-pixel</reftopic>
           for each image ahead of time (especially important when the proper pixel
           location is different from one image to the next), or provide a value for
-          the <refargument>:transparency-pixel</refargument> initarg of this class.
+          the :transparency-pixel initarg of this class.
           By default, the pixel color at location (0, 0) in each image will be used.
         </description>
       </argument>
@@ -328,7 +328,7 @@
       <arguments>
         <argument name="context">
           <description>
-            The context for retrieving the metrics of <refargument>font</refargument>.
+            The context for retrieving the metrics of <arg1/>.
           </description>
         </argument>
         <argument name="font">
@@ -343,7 +343,7 @@
     </syntax>
     <description>
       Returns a <reftopic>gfg:font-metrics</reftopic> object describing
-      attributes of <refargument>font</refargument>.
+      attributes of <arg1/> using <arg0/>.
     </description>
     <seealso>
       <reftopic>gfg:text-extent</reftopic>
@@ -355,7 +355,7 @@
       <arguments>
         <argument name="context">
           <description>
-            The context for measuring the extent of <refargument>string</refargument>.
+            The context for measuring the extent of <arg1/>.
           </description>
         </argument>
         <argument name="string &optional">
@@ -371,12 +371,12 @@
               <argument name=":mnemonic">
                 <description>
                   Underline the mnemonic character if any (preceded in
-                  <refargument>string</refargument> with an ampersand).
+                  <arg1/> with an ampersand).
                 </description>
               </argument>
               <argument name=":tab">
                 <description>
-                  Expand tabs when <refargument>string</refargument> is rendered;
+                  Expand tabs when <arg1/> is rendered;
                   by default the tab width is 8 characters.
                 </description>
               </argument>
@@ -396,9 +396,9 @@
     </syntax>
     <description>
       Returns the size of a rectangular region that would enclose
-      <refargument>string</refargument> if it were drawn. These dimensions
+      <arg1/> if it were drawn. These dimensions
       are dependent on the <reftopic>gfg:font</reftopic> currently selected
-      in <refargument>context</refargument>.
+      in <arg0/>.
     </description>
     <seealso>
       <reftopic>gfg:font-metrics</reftopic>

Modified: trunk/docs/manual/gfs-symbols.xml
==============================================================================
--- trunk/docs/manual/gfs-symbols.xml	(original)
+++ trunk/docs/manual/gfs-symbols.xml	Thu Oct 19 15:15:23 2006
@@ -341,7 +341,7 @@
     </syntax>
     <description>
       Returns a new <reftopic>gfs:point</reftopic> whose X and Y coordinates
-      were copied from the original.
+      were copied from <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:make-point</reftopic>
@@ -363,9 +363,8 @@
     </syntax>
     <description>
       Returns (sets) the <reftopic>gfs:point</reftopic> identifying the coordinates
-      of the upper-left corner of <refargument>rectangle</refargument>. For
-      performance reasons, the existing slot value is returned directly rather
-      than being copied.
+      of the upper-left corner of <arg0/>. For performance reasons, the existing
+      slot value is returned directly rather than being copied.
     </description>
     <seealso>
       <reftopic>gfs:make-rectangle</reftopic>
@@ -388,8 +387,8 @@
     </syntax>
     <description>
       Returns (sets) the <reftopic>gfs:size</reftopic> identifying the dimensions
-      of <refargument>rectangle</refargument>. For performance reasons, the
-      existing slot value is returned directly rather than being copied.
+      of <arg0/>. For performance reasons, the existing slot value is returned
+      directly rather than being copied.
     </description>
     <seealso>
       <reftopic>gfs:make-rectangle</reftopic>
@@ -440,7 +439,7 @@
     </syntax>
     <description>
       Returns a new <reftopic>gfs:rectangle</reftopic> whose location and
-      dimension values were (shallow) copied from the original.
+      dimension values were (shallow) copied from <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:make-rectangle</reftopic>
@@ -462,7 +461,7 @@
     </syntax>
     <description>
       Returns a new <reftopic>gfs:size</reftopic> whose width and
-      height values were copied from the original.
+      height values were copied from <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:make-size</reftopic>
@@ -512,7 +511,7 @@
     </syntax>
     <description>
       Returns a new <reftopic>gfs:span</reftopic> whose start and
-      end values were copied from the original.
+      end values were copied from <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:make-span</reftopic>
@@ -560,8 +559,7 @@
       </return>
     </syntax>
     <description>
-      Returns T if the start and end of <refargument>span</refargument>
-      are the same value.
+      Returns T if the start and end of <arg0/> are the same value.
     </description>
     <seealso>
       <reftopic>gfs:span-start</reftopic>
@@ -588,9 +586,7 @@
       </return>
     </syntax>
     <description>
-      Returns T if <refargument>size1</refargument> and
-      <refargument>size2</refargument> have the same height and
-      width values.
+      Returns T if <arg0/> and <arg1/> have the same height and width values.
     </description>
     <seealso>
       <reftopic>gfs:copy-size</reftopic>
@@ -617,9 +613,8 @@
     </syntax>
     <description>
       <para role="normal">
-        Returns T if <refargument>native-object</refargument> has not yet been
-        initialized or has been discarded via <reftopic>gfs:dispose</reftopic>;
-        NIL otherwise.
+        Returns T if <arg0/> has not yet been initialized or has been discarded
+        via <reftopic>gfs:dispose</reftopic>; NIL otherwise.
       </para>
 
       <para role="normal">
@@ -647,9 +642,9 @@
     </syntax>
     <description>
       <para role="normal">
-        Discards the system resource encapsulated by <reftopic>gfs:native-object</reftopic>
-        and cleans up various data structures internal to Graphic-Forms. For certain
-        objects, this method has visual side effects (for example, disposing
+        Discards the system resource held by <arg0/> and cleans up various
+        data structures internal to Graphic-Forms. For certain objects, this
+        method has visual side effects (for example, disposing
         a window will remove that window from the display). A
         <reftopic>gfs:disposed-error</reftopic>
         will be raised if application code attempts to manipulate the object
@@ -684,7 +679,7 @@
       </return>
     </syntax>
     <description>
-      Returns (sets) the X coordinate of <refargument>point</refargument>.
+      Returns (sets) the X coordinate of <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:point-y</reftopic>
@@ -706,7 +701,7 @@
       </return>
     </syntax>
     <description>
-      Returns (sets) the Y coordinate of <refargument>point</refargument>.
+      Returns (sets) the Y coordinate of <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:point-x</reftopic>
@@ -728,7 +723,7 @@
       </return>
     </syntax>
     <description>
-      Returns (sets) the width value of <refargument>size</refargument>.
+      Returns (sets) the width value of <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:size-height</reftopic>
@@ -750,7 +745,7 @@
       </return>
     </syntax>
     <description>
-      Returns (sets) the height value of <refargument>size</refargument>.
+      Returns (sets) the height value of <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:size-width</reftopic>
@@ -772,7 +767,7 @@
       </return>
     </syntax>
     <description>
-      Returns (sets) the starting value of <refargument>span</refargument>.
+      Returns (sets) the starting value of <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:span-end</reftopic>
@@ -794,7 +789,7 @@
       </return>
     </syntax>
     <description>
-      Returns (sets) the ending value of <refargument>span</refargument>.
+      Returns (sets) the ending value of <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:span-start</reftopic>
@@ -816,8 +811,7 @@
       </return>
     </syntax>
     <description>
-      Returns the Win32 HANDLE or foreign pointer associated with
-      <refargument>native-object</refargument>.
+      Returns the Win32 HANDLE or foreign pointer associated with <arg0/>.
     </description>
     <seealso>
       <reftopic>gfs:dispose</reftopic>
@@ -840,9 +834,8 @@
       </return>
     </syntax>
     <description>
-      Returns the Win32 error code for <refargument>condition</refargument>
-      as determined by the Common Dialog API function
-      <refwin32api>CommDlgExtendedError</refwin32api>.
+      Returns the Win32 error code for <arg0/> as determined by the Common
+      Dialog API function <refwin32api>CommDlgExtendedError</refwin32api>.
     </description>
   </slot-reader>
 
@@ -861,8 +854,8 @@
       </return>
     </syntax>
     <description>
-      Returns the Win32 error code for <refargument>condition</refargument>
-      as determined by <refwin32api>GetLastError</refwin32api>.
+      Returns the Win32 error code for <arg0/> as determined by
+      <refwin32api>GetLastError</refwin32api>.
     </description>
   </slot-reader>
 
@@ -881,7 +874,7 @@
       </return>
     </syntax>
     <description>
-      Returns the detail <refclhs>string</refclhs> for <refargument>condition</refargument>.
+      Returns the detail <refclhs>string</refclhs> for <arg0/>.
     </description>
   </slot-reader>
 



More information about the Graphic-forms-cvs mailing list