<var>
The <var> element identifies a variable within a syntax diagram
or phrase.
Specialization hierarchy
The <var> element is specialized from <ph>.
It is defined in the syntax-diagram domain module, which is a specialization of the
programming domain module.
Content model
(Text | <data> | <foreign> | <keyword> | <term> | <text>)*
Contained by
<groupchoice>, <groupcomp>, <groupseq>, <synph>
- Text
<data><foreign><keyword><term><text>
Contained by
Inheritance
+ topic/ph pr-d/ph syntaxdiagram-d/var
The <var> element is specialized from <ph>. 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
<var> element can be used to identify
variables for which the user will substitute the names of the input
and output files:
<syntaxdiagram frame="bottom">
<title>CopyFile</title>
<groupseq><kwd>COPYF</kwd></groupseq>
<groupcomp><var>input-filename</var><kwd>*INFILE</kwd></groupcomp>
<groupseq><var>output-filename</var><kwd>*OUTFILE</kwd></groupseq>
</syntaxdiagram>