###### 3.2.6.2.16 fragment

Within a syntax definition, a <fragment> is a labeled subpart of the syntax. The <fragment> element allows breaking out logical chunks of a large syntax diagram into named fragments. This element is part of the DITA programming domain, a special set of DITA elements designed to document programming tasks, concepts, and reference information.

###### Contains

Doctype | Content model
topic (technical content), map (technical content), concept, ditabase, glossary, glossentry, glossgroup, reference, task, bookmap | ( (title) (optional) then (fragref or groupchoice or groupcomp or groupseq or synnote or synnoteref) (any number) )

###### Contained by

Doctype | Content model
topic (technical content), map (technical content), concept, ditabase, glossary, glossentry, glossgroup, reference, task (strict), task (general), bookmap | syntaxdiagram, synblk

###### Inheritance

+ topic/figgroup pr-d/fragment

###### 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>
     <groupchoice><var>input-filename</var><kwd>*INFILE</kwd></groupchoice>
     <groupchoice><var>output-filename</var><kwd>*OUTFILE</kwd></groupchoice>
     <fragment>
      <groupchoice><kwd>*OVERLAP</kwd><kwd>*Prompt</kwd></groupchoice>
     </fragment>
    </syntaxdiagram>

###### Attributes

Name | Description | Data Type | Default Value | Required?
univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups) | A set of related attributes, described in 3.4.1.3 univ-atts attribute group |  |  |
global-atts attribute group (xtrf, xtrc) | A set of related attributes, described in 3.4.1.2 global-atts attribute group |  |  |
class, outputclass | Common attributes described in 3.4.1.9 Other common DITA attributes |  |  |

Previous Topic: 3.2.6.2.15 groupcomp

Next Topic: 3.2.6.2.17 fragref

Parent Topic: 3.2.6.2 Programming elements

Sibling Topics:

3.2.6.2.1 apiname

3.2.6.2.2 codeblock

3.2.6.2.3 coderef

3.2.6.2.4 codeph

3.2.6.2.5 option

3.2.6.2.6 parmname

3.2.6.2.7 parml

3.2.6.2.8 plentry

3.2.6.2.9 pt

3.2.6.2.10 pd

3.2.6.2.11 synph

3.2.6.2.12 syntaxdiagram

3.2.6.2.13 groupseq

3.2.6.2.14 groupchoice

3.2.6.2.15 groupcomp

3.2.6.2.17 fragref

3.2.6.2.18 synblk

3.2.6.2.19 synnote

3.2.6.2.20 synnoteref

3.2.6.2.21 kwd

3.2.6.2.22 var

3.2.6.2.23 oper

3.2.6.2.24 delim

3.2.6.2.25 sep

3.2.6.2.26 repsep