Name

$arg-choice-def-close-str, $v:arg-choice-def-open-str, $v:arg-choice-opt-close-str, $v:arg-choice-opt-open-str, $v:arg-choice-plain-close-str, $v:arg-choice-plain-open-str, $v:arg-choice-req-close-str, $v:arg-choice-req-open-str, $v:arg-or-sep, $v:arg-rep-def-str, $v:arg-rep-norepeat-str, $v:arg-rep-repeat-str — Punctuation marks used in formatting cmdsynopsis.

Variable:
{http://docbook.org/ns/docbook/variables}arg-choice-def-close-str
{http://docbook.org/ns/docbook/variables}arg-choice-def-open-str
{http://docbook.org/ns/docbook/variables}arg-choice-opt-close-str
{http://docbook.org/ns/docbook/variables}arg-choice-opt-open-str
{http://docbook.org/ns/docbook/variables}arg-choice-plain-close-str
{http://docbook.org/ns/docbook/variables}arg-choice-plain-open-str
{http://docbook.org/ns/docbook/variables}arg-choice-req-close-str
{http://docbook.org/ns/docbook/variables}arg-choice-req-open-str
{http://docbook.org/ns/docbook/variables}arg-or-sep
{http://docbook.org/ns/docbook/variables}arg-rep-def-str
{http://docbook.org/ns/docbook/variables}arg-rep-norepeat-str
{http://docbook.org/ns/docbook/variables}arg-rep-repeat-str
Defined in:
modules/variable.xsl (12)
Used in:
modules/programming.xsl

Synopsis

 
<xsl:variable name="v:arg-choice-opt-open-str">
   <span class="cmdpunct">[</span>
</xsl:variable>
 
<xsl:variable name="v:arg-choice-opt-close-str">
   <span class="cmdpunct">]</span>
</xsl:variable>
 
<xsl:variable name="v:arg-choice-req-open-str">
   <span class="cmdpunct">{</span>
</xsl:variable>
 
<xsl:variable name="v:arg-choice-req-close-str">
   <span class="cmdpunct">}</span>
</xsl:variable>
 
<xsl:variable name="v:arg-choice-plain-open-str">
   <xsl:text/>
</xsl:variable>
 
<xsl:variable name="v:arg-choice-plain-close-str">
   <xsl:text/>
</xsl:variable>
 
<xsl:variable name="v:arg-choice-def-open-str">
   <span class="cmdpunct">[</span>
</xsl:variable>
 
<xsl:variable name="v:arg-choice-def-close-str">
   <span class="cmdpunct">]</span>
</xsl:variable>
 
<xsl:variable name="v:arg-rep-repeat-str">
   <span class="cmdpunct">…</span>
</xsl:variable>
 
<xsl:variable name="v:arg-rep-norepeat-str">
   <xsl:text/>
</xsl:variable>
 
<xsl:variable name="v:arg-rep-def-str">
   <xsl:text/>
</xsl:variable>
 
<xsl:variable name="v:arg-or-sep">
   <span class="cmdpunct"> | </span>
</xsl:variable>

Description

The cmdsynopsis element is used to model the syntax of command line interfaces. Broadly, a command line interface consists of a command followed by a variety of options. These options can be optional or required and may or may not be repeatable.

User expections about how these should be formatted vary by platform and publisher. The $v:arg-… variables are designed to make it easy to adapt to many common forms of presentation. Each contains (usually) a single character used as a delimiter:

VariableUse in a synopsisDefaulta
$v:arg-choice-def-close-strFollows a default option]
$v:arg-choice-def-open-strPrecedes a default option[
$v:arg-choice-opt-close-strFollows an optional option]
$v:arg-choice-opt-open-strPrecedes an optional option[
$v:arg-choice-plain-close-strFollows an option identified as “plain”(empty string)
$v:arg-choice-plain-open-strPrecedes an option identified as “plain”(empty string)
$v:arg-choice-req-close-strFollows a required option}
$v:arg-choice-req-open-strPrecedes a required option{
$v:arg-or-sepSeparator between options in an “or” group|
$v:arg-rep-def-strIdentifies a repeatable default option(empty string)
$v:arg-rep-norepeat-strIdentifies a non-repeatable option(empty string)
$v:arg-rep-repeat-strIdentifies an explicitly repeatable option

Each of the default characters is placed in an HTML span with the class “cmdpunct”.

A contrived cmdsynopsis appears in Example 1.1, An example of a cmdsynopsis.

 
<cmdsynopsis>
   <command>command</command>
   <arg choice="plain">
      <option>--path <replaceable>PATH</replaceable>
      </option>
   </arg>
   <arg>-opt</arg>
   <arg choice="req">-req</arg>
   <arg rep="repeat">-D<replaceable>name</replaceable>
   </arg>
   <group>
      <arg choice="plain">-M</arg>
      <arg choice="plain">-MD</arg>
   </group>
</cmdsynopsis>
Example 1.1 An example of a cmdsynopsis

One possible rendering of such a synopsis:

command --path PATH [-opt] {-req} [-Dname] [-M | -MD]