mapping_rules.xsd XML Schema File

The XML schema file mapping_rules.xsd contains mapping rules that define the physical column to logical column mapping.

This section provides an annotated version of the mapping_rules.xsd XML schema file.

Example G-1 mapping_rules.xsd

<?xml version="1.0" encoding="utf-8" ?> 
<xs:schema xmlns:xs="">

<!-- This XML validation schema defines data extensibility rules that determine
how objects imported at the Physical layer are mapped to the Business
Model and Mapping layer. -->

 <xs:simpleType name="yes_no_t">
  <xs:restriction base="xs:string">
   <xs:enumeration value="yes" /> 
   <xs:enumeration value="no" /> 

<!-- Description of one mapping -->

 <xs:complexType name="mapping_t">

<!-- The source attribute specifies the physical ADF view object column -->

  <xs:attribute name="source" type="xs:string" use="required" />

<!-- The target attribute specifies the target logical column suffix or complete
name -->

  <xs:attribute name="target" type="xs:string" use="required" />

<!-- The addprefix attribute specifies whether or not the prefix specified in the
"rule" must be prefixed with the target to get the logical table column name
before performing the mapping -->

  <xs:attribute name="addprefix" type="yes_no_t" default="no" use="optional" /> 
 <xs:complexType name="rule_t">

<!-- List of mappings that define the rule -->

   <xs:element name="mapping" type="mapping_t" minOccurs="1" maxOccurs="unbounded"

<!-- The name attribute specifies the rule name. This name is used by the instance
to specify which rule to apply. -->

  <xs:attribute name="name" type="xs:string" use="required" /> 
 <xs:complexType name="rules_t">

<!-- Each rule defines the source (physical) to target (logical) mapping. It
is used by the Import Metadata Wizard during the Physical to Logical Mapping
phase. Each mapping in a rule can specify whether the default prefix for an
instance should be added. -->

   <xs:element name="rule" type="rule_t" minOccurs="1" maxOccurs="unbounded" />
 <xs:complexType name="apply_t">

<!-- The rule attribute specifies which rule to apply for the logical table
mentioned in the instance. -->

  <xs:attribute name="rule" type="xs:string" use="required" />

<!-- The prefix attribute specifies the string that might or might not be
prepended when performing the mapping between the ADF view object column and the
logical table column. -->

  <xs:attribute name="prefix" type="xs:string" default="" use="optional" /> 
 <xs:complexType name="instance_t">

<!-- apply specifies what rule to apply to the logical table -->

   <xs:element name="apply" type="apply_t" minOccurs="1" maxOccurs="unbounded" /> 

<!-- The logicaltable attribute specifies the logical table to which the rule is
applied -->

  <xs:attribute name="logicaltable" type="xs:string" use="required" /> 
 <xs:complexType name="instances_t">

<!-- Each instance is associated with a single logical table. It applies any
number of rules, with an optional prefix. The rules are applied in order. Note
that the prefix includes a space at the end. It merely concatenates with the
target logical column to determine the right logical column to map to. -->

   <xs:element name="instance" type="instance_t" minOccurs="1" maxOccurs="unbounded" /> 

<!-- appName is the ADF Module Name from which ADF view objects are imported -->

   <xs:attribute name="appName" type="xs:string" />

<!-- The document element is the element declaration for the entire document -->

 <xs:element name="document">

<!-- The rules element specifies the set of rules -->

    <xs:element name="rules" type="rules_t" minOccurs="1" maxOccurs="1" />

<!-- The instances element specifies the set of instances related to a single ADF
module. -->

    <xs:element name="instances" type="instances_t" minOccurs="1" maxOccurs="1" />