Internal spec schema basics

The internal schema is an XSD document that is used at runtime to validate spec values, which are provided as an XML document at runtime.

The internal schema also defines the sequence, the number of occurrences, and the data type of the XML elements in the XML document.

You can create the internal spec schema manually, or you can use the InfoSphere® MDM Workbench to generate the internal spec schema.

There are a number of basic internal schema components that must be included when creating a spec schema. When you create the internal schema manually, you must configure it according to the following specifications:
  • elementFormDefault='qualified' must be specified
  • the targetNamespace must be configured with the spec namespace prefix and spec name
  • the xsd and mdmspec namespace prefixes must be declared – use of alternate prefixes for these namespaces is prohibited
  • the spec name must be declared as a namespace prefix – use of an alternate prefix for this namespace is prohibited
  • a root element with the same name as the spec must be declared
  • the introduction of other XML constructs (such as simpleType, complexType, and others) must conform the with spec schema constraints
  • the internal schema name must be in the form <specName>.internal.xsd
When you use the InfoSphere MDM Workbench to generate the internal schema, it automatically creates it with the appropriately configured content. For example:
<?xml version='1.0' encoding='UTF-8'?>
<xsd:schema
  elementFormDefault='qualified'
  targetNamespace='http://www.ibm.com/mdm/data/specs/exampleSpec/internal/00000001'
  xmlns:xsd='http://www.w3.org/2001/XMLSchema'
  xmlns:mdmspec='http://www.ibm.com/mdm/system/specs/mdmspec/internal/00000001'
  xmlns:exampleSpec='http://www.ibm.com/mdm/data/specs/exampleSpec/internal/00000001'>

  <!-- To enable references to the mdmspec schema uncomment the following import element -->
  <!-- To prevent a warning message, only do this if you make use of the imported types -->
  <!-- xsd:import namespace="http://www.ibm.com/mdm/system/specs/mdmspec/internal/00000001"/ -->

  <xsd:element name="exampleSpec" type="exampleSpec:exampleSpecType" />
  <!-- ### Insert spec elements here ### -->
  <!-- ### Insert spec types here ### -->

  <xsd:complexType name="exampleSpecType">
    <xsd:sequence></xsd:sequence>
  </xsd:complexType>
</xsd:schema>