Table of Contents

Search

  1. Preface
  2. Part 1: Concepts and Models
  3. Part 2: Custom XConnect Created with a Load Template
  4. Appendix A: Resource Configuration File

Metadata Manager Custom Metadata Integration Guide

Metadata Manager Custom Metadata Integration Guide

Rule Set Definition File Schema Definition

Rule Set Definition File Schema Definition

A rule set definition file must conform to the structure of the rule set definition file XSD.
The following example shows the rule set definition file XML schema definition:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="ruleSetDefinition"> <xs:annotation> <xs:documentation>Container of rules. This container should have a globally unique name</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <!--Identifiers for selecting the source and target resource. Later it can be used to just select types and provide the actual resources at application time --> <xs:element name="sourceModel"> <xs:complexType> <xs:attribute name="name" type="xs:string"></xs:attribute> </xs:complexType> </xs:element> <xs:element name="targetModel"> <xs:complexType> <xs:attribute name="name" type="xs:string"></xs:attribute> </xs:complexType> </xs:element> <!--A rule set must have at least one rule --> <xs:element name="param" type="paramDefType" maxOccurs="unbounded" minOccurs="0"></xs:element> <xs:element maxOccurs="unbounded" name="rule" type="rule" /> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required" /> <xs:attribute fixed="1.0" name="version" type="xs:string" /> <!--Mandatory attributes for rule set--> <xs:attribute name="description" type="xs:string" use="optional"></xs:attribute> </xs:complexType> </xs:element> <xs:complexType name="rule"> <xs:annotation> <xs:documentation>A rule in a ruleset. A rule is uniquely identified by its name within a rule set</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="sourceFilter" type="sourceElementSelectorType"/> <xs:element name="targetFilter" type="targetElementSelectorType"/> <xs:element name="link" type="linkType"/> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="direction" type="directionType"/> <!--A rule must have source, target, link in the sequence--> </xs:complexType> <xs:simpleType name="directionType"> <xs:restriction base="xs:string"> <xs:enumeration value="SourceToTarget"/> <xs:enumeration value="TargetToSource"/> <xs:enumeration value="Auto"/> </xs:restriction> </xs:simpleType> <xs:complexType name="sourceElementSelectorType"> <xs:choice> <xs:element name="element" type="elementFilterType"/> <xs:element name="endPoint" type="endPointType"/> </xs:choice> </xs:complexType> <xs:complexType name="targetElementSelectorType"> <xs:choice> <xs:element name="element" type="elementFilterType"/> </xs:choice> </xs:complexType> <!-- Right now we are not creating simple types that can define a pattern for specifying identifiers (like class name, feature name, type etc). If we have leisure time later :) we can do that --> <xs:complexType name="elementFilterType"> <xs:choice> <xs:element maxOccurs="unbounded" minOccurs="0" name="element" type="elementFilterType"/> </xs:choice> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="condition" type="xs:string"/> </xs:complexType> <xs:complexType name="endPointType"> <xs:attribute name="class" type="xs:string"/> <xs:attribute name="type" type="xs:string"/> <xs:attribute name="connection" type="xs:string"/> <xs:attribute name="package" type="xs:string"/> </xs:complexType> <xs:complexType name="linkType"> <xs:attribute name="condition" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="paramDefType"> <xs:attribute name="name" type="xs:string"></xs:attribute> <xs:attribute name="description" type="xs:string"></xs:attribute> <xs:attribute name="defaultValue" type="xs:string"></xs:attribute> <xs:attribute name="type" default="string"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="connection"></xs:enumeration> <xs:enumeration value="package"></xs:enumeration> <xs:enumeration value="string"></xs:enumeration> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:schema>

0 COMMENTS

We’d like to hear from you!