<syntaxdiagram>

The <syntaxdiagram> element is the main container for all the syntax elements that make up a syntax definition. The syntax diagram represents the syntax of a statement from a computer language or a command, function call, or programming language statement. Traditionally, the syntax diagram is formatted with "railroad tracks" that connect the units of the syntax together, but the presentation might differ depending on the output media. This element is part of the DITA programming domain, a special set of DITA elements designed to document programming tasks, concepts, and reference information.

Content models

See appendix for information about this element in OASIS document type shells.

Inheritance

+ topic/fig pr-d/syntaxdiagram

Example

This section is non-normative.

<syntaxdiagram>
  <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>

Content model

<title>?, (<fragment> | <fragref> | <groupchoice> | <groupcomp> | <groupseq> | <synblk> | <synnote> | <synnoteref>)*

Not contained by any element.

In order
  1. Optional <title>
  2. Zero or more of the following
    • <fragment>
    • <fragref>
    • <groupchoice>
    • <groupcomp>
    • <groupseq>
    • <synblk>
    • <synnote>
    • <synnoteref>

Not contained by any element.

Inheritance

+ topic/fig pr-d/syntaxdiagram

The <syntaxdiagram> element is specialized from <fig>. It is defined in the pr-domain module.

Attributes

The following attributes are available on this element: Universal attribute group, Display attribute group, and outputclass.