<varname>
A variable name is a placeholder for content that might change based on how something is used, such as a variable supplied to a software application or a user-defined path in a command.
Rendering expectations
The content of the <varname>
element is typically rendered in an
italic font.
Specialization hierarchy
The <varname>
element is specialized from
<keyword>
. It is defined in the software domain module.
Content model
(Text |
<text>
)*
Contained by
<alt>
,
<author>
,
<b>
,
<booklibrary>
,
<booknumber>
,
<bookpartno>
,
<booktitlealt>
,
<brand>
,
<category>
,
<change-request-id>
,
<change-request-system>
,
<change-revisionid>
,
<change-summary>
,
<cite>
,
<codeblock>
,
<codeph>
,
<component>
,
<consequence>
,
<coords>
,
<copyrholder>
,
<data>
,
<day>
,
<dd>
,
<ddhd>
,
<delim>
,
<desc>
,
<div>
,
<draft-comment>
,
<dt>
,
<dthd>
,
<edition>
,
<em>
,
<entry>
,
<example>
,
<fallback>
,
<featnum>
,
<figgroup>
,
<filepath>
,
<fn>
,
<fragref>
,
<howtoavoid>
,
<hwcontrol>
,
<i>
,
<index-see>
,
<index-see-also>
,
<indexterm>
,
<isbn>
,
<keytext>
,
<keywords>
,
<li>
,
<line-through>
,
<lines>
,
<linktitle>
,
<lq>
,
<mainbooktitle>
,
<month>
,
<msgblock>
,
<msgph>
,
<navtitle>
,
<note>
,
<oper>
,
<organization>
,
<overline>
,
<p>
,
<partno>
,
<pd>
,
<person>
,
<ph>
,
<platform>
,
<pre>
,
<printlocation>
,
<prodname>
,
<prognum>
,
<pt>
,
<publisher>
,
<q>
,
<repsep>
,
<revisionid>
,
<screen>
,
<searchtitle>
,
<sep>
,
<series>
,
<shortdesc>
,
<sli>
,
<sort-as>
,
<source>
,
<stentry>
,
<strong>
,
<sub>
,
<subtitle>
,
<summary>
,
<sup>
,
<synnote>
,
<systemoutput>
,
<title>
,
<titlealt>
,
<titlehint>
,
<tt>
,
<typeofhazard>
,
<u>
,
<uicontrol>
,
<userinput>
,
<var>
,
<volume>
,
<xref>
,
<year>
- Text
-
<text>
Contained by
-
<alt>
-
<author>
-
<b>
-
<booklibrary>
-
<booknumber>
-
<bookpartno>
-
<booktitlealt>
-
<brand>
-
<category>
-
<change-request-id>
-
<change-request-system>
-
<change-revisionid>
-
<change-summary>
-
<cite>
-
<codeblock>
-
<codeph>
-
<component>
-
<consequence>
-
<coords>
-
<copyrholder>
-
<data>
-
<day>
-
<dd>
-
<ddhd>
-
<delim>
-
<desc>
-
<div>
-
<draft-comment>
-
<dt>
-
<dthd>
-
<edition>
-
<em>
-
<entry>
-
<example>
-
<fallback>
-
<featnum>
-
<figgroup>
-
<filepath>
-
<fn>
-
<fragref>
-
<howtoavoid>
-
<hwcontrol>
-
<i>
-
<index-see>
-
<index-see-also>
-
<indexterm>
-
<isbn>
-
<keytext>
-
<keywords>
-
<li>
-
<line-through>
-
<lines>
-
<linktitle>
-
<lq>
-
<mainbooktitle>
-
<month>
-
<msgblock>
-
<msgph>
-
<navtitle>
-
<note>
-
<oper>
-
<organization>
-
<overline>
-
<p>
-
<partno>
-
<pd>
-
<person>
-
<ph>
-
<platform>
-
<pre>
-
<printlocation>
-
<prodname>
-
<prognum>
-
<pt>
-
<publisher>
-
<q>
-
<repsep>
-
<revisionid>
-
<screen>
-
<searchtitle>
-
<sep>
-
<series>
-
<shortdesc>
-
<sli>
-
<sort-as>
-
<source>
-
<stentry>
-
<strong>
-
<sub>
-
<subtitle>
-
<summary>
-
<sup>
-
<synnote>
-
<systemoutput>
-
<title>
-
<titlealt>
-
<titlehint>
-
<tt>
-
<typeofhazard>
-
<u>
-
<uicontrol>
-
<userinput>
-
<var>
-
<volume>
-
<xref>
-
<year>
Inheritance
+ topic/keyword sw-d/varname
The <varname>
element is specialized from
<keyword>
. It is defined in the sw-domain module.
Attributes
The following attributes are
available on this element: universal
attributes and @keyref
.
The following attributes are available on this element: universal attributes and the attributes defined below.
@keyref
- Specifies a key
name that acts as a redirectable reference based on a key
definition within a map. See STUB CONTENT for information on using
this attribute.
For HDITA, the equivalent of
@keyref
is@data-keyref
Example
This section is non-normative.
The following code sample shows how the
<varname>
element is used to identify
variables that represent the "installation directory," "project
directory," and "file name":
<filepath>
<varname>install-dir</varname>/projects/working/<varname>project-dir</varname>
/source/<varname>filename</varname>.java
</filepath>