You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by da...@apache.org on 2002/03/08 19:14:20 UTC

cvs commit: tcl-websh/doc Makefile quickref.xml quickref.xsl quickref.html

davidw      02/03/08 10:14:20

  Modified:    doc      Makefile quickref.xml quickref.xsl
  Removed:     doc      quickref.html
  Log:
  Start using new docbook commands in first section of quickref.xml, to
  test them out.
  
  Added some more customizations in the .xsl file.  Make command options
  be underlined, like in the Tcl man pages.
  
  Make xsltproc not fetch things off the network.  This speeds it up a
  lot, although it generates some warnings.
  
  Revision  Changes    Path
  1.3       +1 -1      tcl-websh/doc/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/tcl-websh/doc/Makefile,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile	8 Mar 2002 09:54:49 -0000	1.2
  +++ Makefile	8 Mar 2002 18:14:20 -0000	1.3
  @@ -1,2 +1,2 @@
   quickref.html: quickref.xml quickref.xsl
  -	xsltproc  -o quickref.html quickref.xsl quickref.xml
  \ No newline at end of file
  +	xsltproc --nonet -o quickref.html quickref.xsl quickref.xml
  \ No newline at end of file
  
  
  
  1.5       +54 -55    tcl-websh/doc/quickref.xml
  
  Index: quickref.xml
  ===================================================================
  RCS file: /home/cvs/tcl-websh/doc/quickref.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- quickref.xml	8 Mar 2002 09:54:06 -0000	1.4
  +++ quickref.xml	8 Mar 2002 18:14:20 -0000	1.5
  @@ -1,7 +1,7 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
   
   <!--
  -$Id: quickref.xml,v 1.4 2002/03/08 09:54:06 davidw Exp $
  +$Id: quickref.xml,v 1.5 2002/03/08 18:14:20 davidw Exp $
   -->
   
   <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
  @@ -12,7 +12,7 @@
     <title>Webshell Reference</title>
     <articleinfo>
       <releaseinfo>
  -      $Id: quickref.xml,v 1.4 2002/03/08 09:54:06 davidw Exp $
  +      $Id: quickref.xml,v 1.5 2002/03/08 18:14:20 davidw Exp $
       </releaseinfo>
     </articleinfo>
     <section id="intro">
  @@ -25,9 +25,12 @@
         </para>
         <para>
   	Typically, webshell commands have the following syntax:
  -	<command>web::acommand  <arg choice="opt">options</arg> <arg choice="opt">subcommands</arg>
  -	<arg choice="opt">arguments</arg>
  -	</command>.
  +	<cmdsynopsis>
  +	  <command>web::acommand</command>
  +	  <arg choice="opt">options</arg>
  +	  <arg choice="opt">subcommands</arg>
  +	  <arg choice="opt">arguments</arg>
  +	</cmdsynopsis>
   	Options start with a dash
   	(&quot;-&quot;). As usual, dash-dash (&quot;--&quot;) indicates
   	the &quot;end-of-options&quot;. Thus, <emphasis>web::acommand
  @@ -41,15 +44,15 @@
         </para>
         <para>
   	In addition to the examples given here you might find <ulink
  -								     url="http://websh.com/examples.html">http://websh.com/examples.html</ulink>
  +	  url="http://websh.com/examples.html">http://websh.com/examples.html</ulink>
   	a usefull source of information.
         </para>
       </section>
       <section id="about">
  -      <title>about this document</title>
  +      <title>About this document</title>
         <para>
   	The original version of this document can always be found at
  -	<ulink url="http://websh.com">http://websh.com</ulink>.
  +	<ulink url="http://tcl.apache.org/websh/">http://tcl.apache.org/websh</ulink>.
         </para>
         <note>
   	<para>
  @@ -62,46 +65,43 @@
       </section>
     </section>
     <section id="configuration">
  -    <title>configuration</title>
  +    <title>Configuration</title>
       <section id="web::config">
         <title>web::config</title>
  -      <para>
  -	<variablelist>
  -	  <varlistentry>
  -	    <term>syntax</term>
  -	    <listitem>
  -	      <para>
  -		<emphasis>web::config</emphasis> &lt;key&gt; ?&lt;value&gt;?</para><para>
  -		&lt;key&gt;: <emphasis>uploadfilesize</emphasis>, <emphasis>cmdparam</emphasis>, <emphasis>timeparam</emphasis>,
  -		<emphasis>logsubst</emphasis>, <emphasis>putxmarkup</emphasis>, <emphasis>version</emphasis>, <emphasis>copyright</emphasis>,
  -		<emphasis>encryptchain</emphasis>, and <emphasis>decryptchain</emphasis></para><para>
  -		If &lt;value&gt; is ommitted, the current value of &lt;key&gt; is returned.
  -	      </para>
  -	    </listitem>
  -	  </varlistentry>
  -	</variablelist>
  +      <cmdsynopsis>
  +	<command>web::config</command>
  +	<arg>key</arg>
  +	<arg choice="opt">value</arg>
  +      </cmdsynopsis>
  +      <!--
  +	<emphasis>web::config</emphasis> &lt;key&gt; ?&lt;value&gt;?</para><para>
  +	&lt;key&gt;: <emphasis>uploadfilesize</emphasis>, <emphasis>cmdparam</emphasis>, <emphasis>timeparam</emphasis>,
  +	<emphasis>logsubst</emphasis>, <emphasis>putxmarkup</emphasis>, <emphasis>version</emphasis>, <emphasis>copyright</emphasis>,
  +	<emphasis>encryptchain</emphasis>, and <emphasis>decryptchain</emphasis></para><para>
  +	If &lt;value&gt; is ommitted, the current value of &lt;key&gt; is returned.
  +	-->
   
  -	<variablelist>
  -	  <varlistentry>
  -	    <term>uploadfilesize ?&lt;size&gt;?</term>
  -	    <listitem>
  -	      <para>
  -		Sets the maximum number of bytes allowed to be uploaded.
  -		Default: 0.
  -	      </para>
  -	    </listitem>
  -	  </varlistentry>
  -	  <varlistentry>
  -	    <term>cmdparam ?&lt;name&gt;?</term>
  -	    <listitem>
  -	      <para>
  -		Name of the parameter to store reference to a web::command command
  -		in the URL. Default: &quot;cmd&quot;.
  +      <variablelist>
  +	<varlistentry>
  +	  <term><option>uploadfilesize</option> <optional><option>size</option></optional></term>
  +	  <listitem>
  +	    <para>
  +	      Sets the maximum number of bytes allowed to be uploaded.
  +	      Default: 0.
  +	    </para>
  +	  </listitem>
  +	</varlistentry>
  +	<varlistentry>
  +	  <term><option>cmdparam</option> <optional><option>name</option></optional></term>
  +	  <listitem>
  +	    <para>
  +	      Name of the parameter to store reference to a web::command command
  +	      in the URL. Default: &quot;cmd&quot;.
   	      </para>
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>timeparam ?&lt;name&gt;?</term>
  +	    <term><option>timeparam</option> <optional><option>name</option></optional></term>
   	    <listitem>
   	      <para>
   		Name of the parameter to store reference to the timestamp
  @@ -110,7 +110,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>logsubst ?&lt;boolean&gt;?</term>
  +	    <term><option>logsubst</option> <optional><option>boolean</option></optional></term>
   	    <listitem>
   	      <para>
   		Turns substitution of log messages on or off. Default: on.
  @@ -118,18 +118,18 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>putxmarkup ?brace|tag?</term>
  +	    <term><option>putxmarkup</option> <optional><option>brace|tag</option></optional></term>
   	    <listitem>
   	      <para>
   		Sets the markup characters for sections to be eval'd in web::putx
  -		and web::putxfile commands to either curly braces ({ ... }) or 
  +		and web::putxfile commands to either curly braces ({ ... }) or
   		special tags (&lt;% ... %&gt;). Please note that when using the tags &lt;%%&gt;,
   		they cannot be nested. Default: brace.
   	      </para>
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>version</term>
  +	  <term><option>version</option></term>
   	    <listitem>
   	      <para>
   		Returns the version info string
  @@ -137,7 +137,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>copyright</term>
  +	  <term><option>copyright</option></term>
   	    <listitem>
   	      <para>
   		Returns a copyright message string
  @@ -145,7 +145,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>encryptchain &lt;list&gt;</term>
  +	  <term><option>encryptchain</option> <option>list</option></term>
   	    <listitem>
   	      <para>
   		defines which commands should be tried, in sequence, to encrypt
  @@ -154,7 +154,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>decryptchain &lt;list&gt;</term>
  +	  <term><option>decryptchain</option> <option>list</option></term>
   	    <listitem>
   	      <para>
   		defines which commands should be tried, in sequence, to decrypt
  @@ -164,7 +164,6 @@
   	  </varlistentry>
   	</variablelist>
   
  -      </para>
       </section>
       <section id="Examples0">
         <title>Examples</title>
  @@ -1520,7 +1519,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>&lt;name&gt;::cnames ?&lt;pattern&gt;?</term>
  +	    <term><option>&lt;name&gt;::cnames</option> <optional><option>pattern</option></optional></term>
   	    <listitem>
   	      <para>
   		lists existing keys of context matching &lt;pattern&gt;
  @@ -1589,7 +1588,7 @@
   
   	<variablelist>
   	  <varlistentry>
  -	    <term>&lt;name&gt;::init ?&lt;id&gt;?</term>
  +	    <term><option>&lt;name&gt;::init</option> <optional><option>id</option></optional></term>
   	    <listitem>
   	      <para>
   		load an existing session context with id &lt;id&gt;, or create a new one,
  @@ -1601,7 +1600,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>&lt;name&gt;::new ?&lt;id&gt;?</term>
  +	    <term><option>&lt;name&gt;::new</option> <optional><option>id</option></optional></term>
   	    <listitem>
   	      <para>
   		create a new session context. Automation depends on the settings of the
  @@ -1743,7 +1742,7 @@
   
   	<variablelist>
   	  <varlistentry>
  -	    <term>&lt;name&gt;::init ?&lt;id&gt;?</term>
  +	    <term><option>&lt;name&gt;::init</option> <optional><option>id</option></optional></term>
   	    <listitem>
   	      <para>
   		load an existing session context (cookie must have been sent by the
  @@ -1752,7 +1751,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>&lt;name&gt;::new ?&lt;id&gt;?</term>
  +	    <term><option>&lt;name&gt;::new</option> <optional><option>id</option></optional></term>
   	    <listitem>
   	      <para>
   		create a new session context.
  @@ -2218,7 +2217,7 @@
   	    </listitem>
   	  </varlistentry>
   	  <varlistentry>
  -	    <term>web::cryptdkey ?&lt;key&gt;?</term>
  +	    <term><option>web::cryptdkey</option> <optional><option>key</option></optional></term>
   	    <listitem>
   	      <para>
   	      </para>
  
  
  
  1.2       +94 -15    tcl-websh/doc/quickref.xsl
  
  Index: quickref.xsl
  ===================================================================
  RCS file: /home/cvs/tcl-websh/doc/quickref.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- quickref.xsl	8 Mar 2002 09:52:50 -0000	1.1
  +++ quickref.xsl	8 Mar 2002 18:14:20 -0000	1.2
  @@ -4,23 +4,23 @@
     exclude-result-prefixes="doc"
     version='1.0'>
   
  -<!--
  -<xsl:output method="html"
  -    encoding="ISO-8859-1"
  -    indent="no"/>
  --->
  -
  -<!-- ********************************************************************
  -     $Id: quickref.xsl,v 1.1 2002/03/08 09:52:50 davidw Exp $
  -     ********************************************************************
  -
  -     This file is part of the XSL DocBook Stylesheet distribution.
  -     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
  -     and other information.
  +  <!--
  +  <xsl:output method="html"
  +  encoding="ISO-8859-1"
  +  indent="no"/>
  +  -->
  +
  +  <!-- ********************************************************************
  +  $Id: quickref.xsl,v 1.2 2002/03/08 18:14:20 davidw Exp $
  +  ********************************************************************
  +
  +  This file is part of the XSL DocBook Stylesheet distribution.
  +  See ../README or http://nwalsh.com/docbook/xsl/ for copyright
  +  and other information.
   
  -     ******************************************************************** -->
  +  ******************************************************************** -->
   
  -<!-- ==================================================================== -->
  +  <!-- ==================================================================== -->
   
     <xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl" />
   
  @@ -28,6 +28,85 @@
     <xsl:variable name="arg.choice.opt.close.str">?</xsl:variable>
     <xsl:variable name="arg.choice.req.open.str"></xsl:variable>
     <xsl:variable name="arg.choice.req.close.str"></xsl:variable>
  +
  +  <xsl:variable name="arg.choice.def.open.str"></xsl:variable>
  +  <xsl:variable name="arg.choice.def.close.str"></xsl:variable>
  +
  +  <!-- <u> isn't a valid tag, so the best way to do this is via CSS,
  +  but that's a pain - fixme-later.-->
  +  <xsl:template name="inline.underlineseq">
  +    <xsl:param name="content">
  +      <xsl:call-template name="anchor"/>
  +      <xsl:apply-templates/>
  +    </xsl:param>
  +    <u><xsl:copy-of select="$content"/></u>
  +  </xsl:template>
  +
  +  <xsl:template match="optional">
  +    <xsl:value-of select="$arg.choice.opt.open.str"/>
  +    <xsl:call-template name="inline.charseq"/>
  +    <xsl:value-of select="$arg.choice.opt.close.str"/>
  +  </xsl:template>
  +
  +  <xsl:template match="option">
  +    <xsl:call-template name="inline.underlineseq"/>
  +  </xsl:template>
  +
  +  <xsl:template match="group|arg">
  +    <xsl:variable name="choice" select="@choice"/>
  +    <xsl:variable name="rep" select="@rep"/>
  +    <xsl:variable name="sepchar">
  +      <xsl:choose>
  +	<xsl:when test="ancestor-or-self::*/@sepchar">
  +	  <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
  +	</xsl:when>
  +	<xsl:otherwise>
  +	  <xsl:text> </xsl:text>
  +	</xsl:otherwise>
  +      </xsl:choose>
  +    </xsl:variable>
  +    <xsl:if test="position()>1"><xsl:value-of select="$sepchar"/></xsl:if>
  +    <xsl:choose>
  +      <xsl:when test="$choice='plain'">
  +	<xsl:value-of select="$arg.choice.plain.open.str"/>
  +      </xsl:when>
  +      <xsl:when test="$choice='req'">
  +	<xsl:value-of select="$arg.choice.req.open.str"/>
  +      </xsl:when>
  +      <xsl:when test="$choice='opt'">
  +	<xsl:value-of select="$arg.choice.opt.open.str"/>
  +      </xsl:when>
  +      <xsl:otherwise>
  +	<xsl:value-of select="$arg.choice.def.open.str"/>
  +      </xsl:otherwise>
  +    </xsl:choose>
  +    <xsl:call-template name="inline.underlineseq"/>
  +    <xsl:choose>
  +      <xsl:when test="$rep='repeat'">
  +	<xsl:value-of select="$arg.rep.repeat.str"/>
  +      </xsl:when>
  +      <xsl:when test="$rep='norepeat'">
  +	<xsl:value-of select="$arg.rep.norepeat.str"/>
  +      </xsl:when>
  +      <xsl:otherwise>
  +	<xsl:value-of select="$arg.rep.def.str"/>
  +      </xsl:otherwise>
  +    </xsl:choose>
  +    <xsl:choose>
  +      <xsl:when test="$choice='plain'">
  +	<xsl:value-of select="$arg.choice.plain.close.str"/>
  +      </xsl:when>
  +      <xsl:when test="$choice='req'">
  +	<xsl:value-of select="$arg.choice.req.close.str"/>
  +      </xsl:when>
  +      <xsl:when test="$choice='opt'">
  +	<xsl:value-of select="$arg.choice.opt.close.str"/>
  +      </xsl:when>
  +      <xsl:otherwise>
  +	<xsl:value-of select="$arg.choice.def.close.str"/>
  +      </xsl:otherwise>
  +    </xsl:choose>
  +  </xsl:template>
   
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org