var

Within a syntax diagram, the <var> element defines a variable for which the user must supply content, such as their user name or password. It is represented in output in an italic font. This element is part of the DITA programming domain, a special set of DITA elements designed to document programming tasks, concepts and reference information.

Contains

( text data or keyword or option or parmname or apiname or cmdname or msgnum or varname or wintitle or term) (any number)

Contained by

synph, groupseq, groupchoice, groupcomp

Inheritance

topic/ph, pr-d/var

Attributes

Name Description Data Type Default Value Required?
importance The attribute indicates whether a variable is optional, required, or default. optional | required | default #IMPLIED No
%univ-atts-no-importance A set of related attributes, described at %univ-atts;, but without the importance attribute parameter entity PE not applicable Not applicable
%global-atts; (xtrf, xtrc) A set of related attributes, described at %global-atts; parameter entity PE not applicable Not applicable
class, outputclass Common attributes described in Other common DITA attributes

Example

 
<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>
 <groupchoice><var>input-filename</var><kwd>*INFILE</kwd></groupchoice>
 <groupchoice><var>output-filename</var><kwd>*OUTFILE</kwd></groupchoice>
</syntaxdiagram>

OASIS DITA Language Specification v1.0 -- 09 May 2005
Copyright (c) OASIS Open 2005. All Rights Reserved.