Include Statement

You may find it convenient to break a large rule set into smaller pieces for ease of parallel development or re-use. Each rule set may contain Include statements to "pull in" other rule sets and classes. The root element in an included item must be either:

Different types of Include statements are supported:

Tip: Within a rule set, there is no meaning attached to the order that Include statements are specified. You are free to reorder Include statements within a rule set without affecting the behavior of the rule set.
<?xml version="1.0" encoding="UTF-8"?>
<RuleSet name="Example_Include"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
"http://www.curamsoftware.com/CreoleRulesSchema.xsd">

  <!-- This rule class is defined directly in this rule set -->
  <Class name="Person">
    <Attribute name="firstName">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>
  </Class>

  <!-- Include a rule set defined in another file.

       When assembled into a single rule set, the
       names of all the rule classes must be unique. -->
  <Include>
    <RelativePath value="./HelloWorld.xml"/>
  </Include>

</RuleSet>

See CER Rule Set Consolidator for how to collapse a rule set which contains RelativePath inclusions into a single rule set file.