<groupchoice>
The <groupchoice> element provides a set of choices between
groups of pieces of syntax.
Usage information
Each syntax group is a logical set of pieces of syntax that go together. A group choice specifies that the user must make a choice about which part of the syntax to use. Groups are often nested.
Specialization hierarchy
The <groupchoice> element is specialized from
<figgroup>. It is defined in the syntax-diagram domain module,
which is a specialization of the programming domain module.
Content model
<title>?, <repsep>?, (<delim> | <fragref> | <groupchoice> | <groupcomp> | <groupseq> | <kwd> | <oper> | <sep> | <synnote> | <synnoteref> | <var>)*
Contained by
<fragment>, <groupchoice>, <groupcomp>, <groupseq>, <synblk>, <syntaxdiagram>
- Optional
<title> - Optional
<repsep> - Zero or more of the following
Contained by
Inheritance
+ topic/figgroup pr-d/figgroup syntaxdiagram-d/groupchoice
The <groupchoice> element is specialized from <figgroup>. It is defined in the syntaxdiagram-domain module.
Attributes
The following attributes are available on this element: universal attributes.
For this element, the
@importance attribute indicates
whether this item in a syntax diagram is optional, required,
or used by default. The attribute value is limited to
optional,
required,
default, or
-dita-use-conref-target.
The following attributes are available on this element: universal attributes and the attributes defined below.
@importance- For this element, the
@importanceattribute indicates whether this item in a syntax diagram is optional, required, or used by default. The attribute value is limited to optional, required, default, or -dita-use-conref-target.
Example
This section is non-normative.
The following code sample shows how the
<groupchoice> element can be used to
specify that there are two ways to specify an input file name to a
command line program:
<syntaxdiagram>
<title>Syntax for runprogram command</title>
<groupseq>
<kwd>runprogram</kwd>
<groupchoice>
<groupcomp><oper>-</oper><kwd>i</kwd><sep>:</sep><var>program-name.py</var></groupcomp>
<groupcomp><oper>--</oper><kwd>input</kwd><sep>=</sep><var>program-name.py</var></groupcomp>
</groupchoice>
</groupseq>
</syntaxdiagram>