<fragref>

A fragment reference is the mechanism for referencing a syntax fragment within the same syntax diagram.

Usage information

The <fragref> element is used to reference a syntax fragment multiple times or pull a large section of syntax out of line for easier reading.

Specialization hierarchy

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

Content model

(Text | <keyword> | <markupname> | <apiname> | <option> | <parmname> | <cmdname> | <msgnum> | <varname> | <wintitle> | <numcharref> | <parameterentity> | <textentity> | <xmlatt> | <xmlelement> | <xmlnsname> | <xmlpi> | <ph> | <strong> | <em> | <b> | <i> | <line-through> | <overline> | <sup> | <sub> | <tt> | <u> | <hwcontrol> | <partno> | <codeph> | <filepath> | <msgph> | <systemoutput> | <userinput> | <synph> | <menucascade> | <uicontrol> | <q> | <term> | <abbreviated-form> | <text> | <tm> | <data> | <sort-as> | <draft-comment> | <foreign> | <required-cleanup> )*

Attributes

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

For this element:
  • The @href attribute is a reference to a syntax diagram <fragment>. The referenced <fragment> must be in the same diagram as the <fragref> element.
  • The @importance attribute is limited to the values optional, required, or -dita-use-conref-target.

The following attributes are available on this element: universal attributes and the attributes defined below.

@href (link-relationship attributes)
Specifies a reference to a resource. See STUB CONTENT for detailed information on supported values and processing implications.
The @href attribute is a reference to a syntax diagram <fragment>. The referenced <fragment> must be in the same diagram as the <fragref> element.
@importance
The @importance attribute is limited to the values optional, required, or -dita-use-conref-target.

Example

This section is non-normative.

The following code sample shows how the <fragref> element can be used to break out a set of related logging options from the larger set of syntax. The <fragref> element is part of the program sequence after an input file, but the syntax for logging is defined outside of the main diagram.

<syntaxdiagram frame="none">
  <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>
  <fragref href="#./overlay"/>
  <groupchoice><var>input-filename</var><kwd>*INFILE</kwd></groupchoice>
  <groupchoice><var>output-filename</var><kwd>*OUTFILE</kwd></groupchoice>
  <fragment id="overlay">
    <title>Overlay</title>
    <groupchoice><kwd>*OVERLAP</kwd><kwd>*Prompt</kwd></groupchoice>
  </fragment>
</syntaxdiagram>