<fragref>

The <fragref> element provides a logical reference to a <fragment> element within a syntax diagram, so that you can reference a syntax fragment multiple times or pull a large section of syntax out of line for easier reading. 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/xref pr-d/fragref

Example

This markup example:
<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="#syntax/overlay"></fragref>
 <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>
might produce output like the following:
CopyFile

>>-COPYF--input-filename*INFILE--output-filename--*OUTFILE------>

>--| Overlay |--+-input-filename-+--+-output-filename-+--------><
                '-*INFILE--------'  '-*OUTFILE--------'

Overlay

|--+-*OVERLAP-+-------------------------------------------------|
   '-*Prompt--'

Attributes

The following attributes are available on this element: Universal attribute group (with a narrowed definition of @importance, given below), outputclass, and the attributes defined below.

@href
A reference to a syntax diagram <fragment> element. The referenced <fragment> must be in the same diagram as the <fragref> element. See The href attribute for detailed information on supported values and processing implications.
@importance
The attribute indicates whether this item in a syntax diagram is optional or required. Output processors might indicate this designation in a generated diagram. Allowable values are:
optional
This section of the syntax is optional.
required
This section of the syntax is required.
-dita-use-conref-target
See Using the -dita-use-conref-target value for more information.