<kwd>

The <kwd> element identifies a keyword within a syntax diagram or phrase.

Usage information

A <kwd> might be entered by a user typing in the syntax, or rendered by an application as part of a syntax prompt. The keyword value is typed or rendered exactly as specified in the syntax diagram or phrase.

Specialization hierarchy

The <kwd> element is specialized from <keyword>. It is defined in the syntax-diagram domain module, which is a specialization of the programming domain module.

Content model

(Text | <text> )*

Zero or more
  • Text
  • <text>

Attributes

The following attributes are available on this element: universal attributes and @keyref.

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 @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.
@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 <kwd> element can be used to identify text that must be provided to the application exactly as specified:

<syntaxdiagram id="validate">
  <title>Validate account setup</title>
  <groupseq>
    <kwd>clicmd</kwd>
    <groupcomp>
      <oper>--</oper><kwd>user</kwd><sep>=</sep><var>userid</var>
    </groupcomp>
    <groupcomp>
      <oper>--</oper><kwd>validate</kwd>
    </groupcomp>
  </groupseq>
</syntaxdiagram>