Source (C preprocessor):
/*---a.h---*/
<?xml
version="1.0" encoding="UTF-8"?>
<kdm:Segment xmi:version="2.1"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:action="http://kdm.omg.org/action"
xmlns:code="http://kdm.omg.org/code"
xmlns:kdm="http://kdm.omg.org/kdm"
name="Include
Directive Example">
<model xmi:id="id.0"
xmi:type="code:CodeModel">
<extensionFamily
xmi:id="id.1" >
<stereotype
xmi:id="id.2" name="sample"/>
</extensionFamily>
<codeElement
xmi:id="id.3" xmi:type="code:SharedUnit"
name="a.h">
<codeElement
xmi:id="id.4" xmi:type="code:CodeElement"
stereotype="id.2" name="c1">
<source xmi:id="id.5" language="C"/>
</codeElement>
<codeElement
xmi:id="id.6" xmi:type="code:CodeElement"
stereotype="id.2" name="c2">
<source xmi:id="id.7" language="C"/>
</codeElement>
</codeElement>
<codeElement
xmi:id="id.8" xmi:type="code:CompilationUnit"
name="a.c">
<codeElement
xmi:id="id.9" xmi:type="code:IncludeDirective">
<source language="Cpreprocessor" snippet="#include "a.h""/>
<codeRelation
xmi:id="id.10" xmi:type="code:Includes"
to="id.3" from="id.9"/>
</codeElement>
<codeElement
xmi:id="id.11" xmi:type="action:BlockUnit"
name="b1">
<codeRelation
xmi:id="id.12" xmi:type="code:GeneratedFrom"
to="id.9" from="id.11"/>
<codeElement
xmi:id="id.13" xmi:type="code:CodeElement"
stereotype="id.2" name="c1_clone">
<source xmi:id="id.14" language="C"/>
</codeElement>
<codeElement
xmi:id="id.15" xmi:type="code:CodeElement"
stereotype="id.2" name="c2_clone">
<source xmi:id="id.16" language="C"/>
</codeElement>
</codeElement>
<codeElement
xmi:id="id.17" xmi:type="action:BlockUnit"
name="b2">
<codeElement
xmi:id="id.18" xmi:type="action:ActionElement"
name="a1">
<actionRelation
xmi:id="id.19" xmi:type="action:ActionRelationship"
to="id.13" from="id.18"/>
</codeElement>
</codeElement>
</codeElement>
</model>
</kdm:Segment>