Content
C1. Guidelines
| Ref |
Guideline |
| 25.1 |
All MISMO containers MUST have one EXTENSION container as a direct child. |
| 25.1.1 |
The EXTENSION container WILL have a cardinality of zero to one. |
| 25.2 |
The EXTENSION container MUST be defined as xs:any with a cardinality of zero to many. This definition allows any content to occur under the EXTENSION element. The intention is to allow multiple children under each EXTENSION container. The specific XML definition is included below. |
| 25.3 |
When extending a MISMO standard container, an organization MUST place all extended content under the EXTENSION container. This content will be managed in the extending organization’s namespace, thereby identifying the organization and preventing potential collisions. |
| 25.4 |
Extended content provided by any organization other than MISMO, MUST NOT occur in the MISMO Namespace. |
| 25.5 |
When an organization extends the standard, it SHOULD follow the MEG prohibiting mixed containers. Therefore, the organization MUST add data points to EXTENSION containers at the data point level (see C.2.1 below). If the organization wishes to add an entire container, it MUST place it in the appropriate EXTENSION container at the container level (see C.2.2 below). |
| 25.6 |
Extensions SHOULD follow MISMO Naming Conventions and capitalization, such as the use of class words, Upper Camel Case for data points, and all capital letters for containers. |
| 25.7 |
When an organization adds enumerated values, it should create a new data point with a base type of the underlying MISMO standard enumerated data point, and then add the new enumerated values. |
C2. Reference Model of the EXTENSION Container
C.2.1 Adding Data Points

C.2.2 Adding Containers

C3. XML Examples
C.3.1 XML Definition of the EXTENSION Container
<xsd:complexType name="EXTENSION">
<xsd:sequence>
<xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
C.3.2 XML Instance of One Container with Extensions from Multiple Organizations
<mismo:NAME xmlns:mismo="http://mismo.org/residential/2008/schemas" xmlns:abc="http://abcmortgage.com" xmlns:xyz="http://xyzlender.com">
<mismo:NameText>John Smith</mismo:NameText>
<mismo:EducationalAchievements>M.B.A.</mismo:EducationalAchievements>
<mismo:EXTENSION>
<abc:BorrowerEyeColor>Blue</abc:BorrowerEyeColor>
<xyz:BorrowerHairColor>Brown</xyz:BorrowerHairColor>
</mismo:EXTENSION>
</mismo:NAME>
C4. Implementation Examples
C4.1 Including MISMO.org Definitions in Your Organization’s Schema
Use Case: Acme wants to use MISMO definitions in an internal application that is completely different from any application covered by the DEAL structure. Acme is developing a Lead Management System that will communicate using its own Schema structure. However, it wants to increase the system‘s interoperability by using the MISMO enumerations for common fields.
Question: How does Acme.com create a Schema that uses the MISMO.org definitions?
Answer: 1. Use xsd:import.
2. ListA.xsd is a definition of a simple type of enumerations in the MISMO namespace.
3. ListB.xsd is in the Acme.com namespace and pulls the MISMO definition in using xsd:import.
4. EnumExample1.xml is completely in the Acme.com namespace and valid when examined by ListB.xsd.
ListA.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mismo.org">
<xsd:simpleType name="ListA">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Car"/>
<xsd:enumeration value="Boat"/>
<xsd:enumeration value="Train"/>
<xsd:enumeration value="Other"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
ListB.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://acme.com" xmlns="http://acme.com" xmlns:mismo="http://mismo.org">
<xsd:import namespace="http://mismo.org" schemaLocation="ListA.xsd"/>
<xsd:simpleType name="ListB">
<xsd:list itemType="mismo:ListA">
</xsd:list>
</xsd:simpleType>
<xsd:element name="Root">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Value" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Value" type="ListB"/>
</xsd:schema>
EnumExample1.xml
<?xml version="1.0"?>
<Root xmlns="http://acme.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acme.com file:///c:/MISMO/D3/SchemaIdeas/ListB.xsd">
<Value>Boat</Value>
<Value>Car</Value>
<Value>Train</Value>
</Root>
Answer: Use xsd:restriction to explicitly limit the desired values.
Discussion: Attached file ListC.xsd takes the inherited MISMO definition into ListB then uses xsd:restriction to define the desired subset. EnumExample2Invalid.xml is not valid when examined by ListC.xsd because it contains a value that was restricted.
If Acme tried to add a new value “Taxi” to the set of xsd:enumeration elements in their schema it would not be a valid schema because “Taxi” was not in the MISMO definition.
Note also that the element names changed from Value to myValue. This is a recommended practice. It make explicit that the definition of the data point myValue is different from the MISMO data point Value. The definition of an enumerated data point is it’s list of allowed values. Change the list you have a different data point with a different name.
Attached file ListC.xsd defines a restriction of the MISMO definition and shows
ListC.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://acme.com" xmlns="http://acme.com" xmlns:mismo="http://mismo.org">
<xsd:import namespace="http://mismo.org" schemaLocation="ListA.xsd"/>
<xsd:simpleType name="ListB">
<xsd:list itemType="mismo:ListA">
</xsd:list>
</xsd:simpleType>
<xsd:simpleType name="ListC">
<xsd:restriction base="ListB">
<xsd:enumeration value="Car"/>
<xsd:enumeration value="Boat"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="Root">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="myValue" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="myValue" type="ListC"/>
</xsd:schema>
EnumExample2Invalid.xml
<?xml version="1.0"?>
<Root xmlns="http://acme.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acme.com file:///c:/MISMO/D3/SchemaIdeas/ListC.xsd">
<myValue>Boat</myValue>
<myValue>Car</myValue>
<myValue>Train</myValue>
</Root>
C4.3 Question: What if the MISMO list is too short and Acme wants a more enumerations?
Answer: Use xsd:simpleType to explicitly define the desired values.
Discussion: As mentioned above the data point definition for an enumerated data point include its set of allowable values. A different list is a different definition, therefore a different data point. Because the fully qualified name includes the namespace http://acme.com:Value is different from http://mismo.org:Value. ListD.xsd defines the simple type with it’s enumeration in the Acme namespace.
Alternative Solution: Most MISMO enumerations have a valid value “Other” We can extend the MISMO Simple type definition into a Simple Content definition by adding an attribute in the Acme namespace that holds just the Acme values that are considered “Other” in the MISMO definition. Attached schema ListDAlt.xsd has this definition and EnumExample3Alt.xml shows the instance document.
ListD.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://acme.com" xmlns="http://acme.com" xmlns:mismo="http://mismo.org">
<xsd:import namespace="http://mismo.org" schemaLocation="ListA.xsd"/>
<xsd:simpleType name="ListB">
<xsd:list itemType="mismo:ListA">
</xsd:list>
</xsd:simpleType>
<xsd:simpleType name="ListC">
<xsd:restriction base="ListB">
<xsd:enumeration value="Car"/>
<xsd:enumeration value="Boat"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ListD">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Car"/>
<xsd:enumeration value="Boat"/>
<xsd:enumeration value="Train"/>
<xsd:enumeration value="Taxi"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="Root">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="myValue" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="myValue" type="ListD"/>
</xsd:schema>
ListDAlt.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://acme.com" xmlns="http://acme.com" xmlns:mismo="http://mismo.org" elementFormDefault="qualified">
<xsd:import namespace="http://mismo.org" schemaLocation="ListA.xsd"/>
<xsd:simpleType name="ListB">
<xsd:list itemType="mismo:ListA">
</xsd:list>
</xsd:simpleType>
<xsd:simpleType name="ListC">
<xsd:restriction base="ListB">
<xsd:enumeration value="Car"/>
<xsd:enumeration value="Boat"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="ListD">
<xsd:simpleContent>
<xsd:extension base="ListB">
<xsd:attribute name="OtherValue">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Taxi"/>
<xsd:enumeration value="Bus"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="Root">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="myValue" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="myValue" type="ListD"/>
</xsd:schema>
Example3.xml
<Root xmlns="http://acme.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acme.com ListD.xsd">
<MyValue>Boat</MyValue>
<MyValue>Car</MyValue>
<MyValue>Train</MyValue>
<MyValue>Taxi</MyValue>
</Root>
Example3Alt.xml
<?xml version="1.0"?>
<Root xmlns="http://acme.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acme.com file:///c:/MISMO/D3/SchemaIdeas/ListDAlt.xsd">
<Value>Boat</Value>
<Value>Car</Value>
<Value>Train</Value>
<Value OtherValue="Taxi">Other</Value>
<Value OtherValue="Bus">Other</Value>
</Root>
C4.4 Question: How can we use MISMO namespace and the Acme namespaces together in one document? Specifically how can we use Acme inside a MISMO extension element?
Answer: MISMO EXTENSION is defined to accept ANY content so xml from the Acme namespace from ListB.xsd, ListC.xsd, ListD.xsd or ListDAlt.xsd can be included. For it to validate theInstamce document needs to be able to find the definitions for both namespaces.
Discussion: Attached files Root.xsd, Merged.xsd and MergedExample.xml show how MISMO definitions are inherited into a schema that merges MISMO and Acme content.
Root.XSD
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://mismo.org" targetNamespace="http://mismo.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:element name="ROOT" type="RootType"/>
<xsd:complexType name="RootType">
<xsd:sequence>
<xsd:element name="Value" type="ListA" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element name="EXTENTION" minOccurs="0" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="ListA">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Car"/>
<xsd:enumeration value="Boat"/>
<xsd:enumeration value="Train"/>
<xsd:enumeration value="Other"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
Merged Example
<ROOT xmlns="http://mismo.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://acme.com file:///c:/MISMO/D3/SchemaIdeas/Merged.xsd">
<Value>Car</Value>
<Value>Boat</Value>
<EXTENSION>
<Value xmlns="http://acme.com" OtherValue="Taxi">Other</Value>
</EXTENSION>
</ROOT>
Merged.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://acme.com" xmlns="http://acme.com" xmlns:mismo="http://mismo.org" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:import namespace="http://mismo.org" schemaLocation="Root.xsd"/>
<xsd:simpleType name="ListB">
<xsd:list itemType="mismo:ListA">
</xsd:list>
</xsd:simpleType>
<xsd:simpleType name="ListC">
<xsd:restriction base="ListB">
<xsd:enumeration value="Car"/>
<xsd:enumeration value="Boat"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="ListD">
<xsd:simpleContent>
<xsd:extension base="ListB">
<xsd:attribute name="OtherValue">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Taxi"/>
<xsd:enumeration value="Bus"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="Value" type="ListD"/>
</xsd:schema>
M1. Metadata
| Element |
Description |
| Title |
Extending the Standard |
| Identifier |
MEG0025 |
| Category |
Foundation |
| Date Created |
12/18/2006 12:55:00 PM |
| Date Modified |
01/15/2009 1:55:00 PM |
| Publisher |
MISMO |
| Copyright |
©2008 MISMO. All Rights Reserved. |
M1.1 Release History
| Release Date |
Version No. |
Comments |
| 12/19/2006 |
0.01 |
Initial Version |
| 04/02/2008 |
0.02 |
DMK Update |
| 05/08/2008 |
0.03 |
DMK made updates per the 5/1 D3 conference call |
| 12/04/2008 |
0.04 |
Formatting changes |
| 12/11/2008 |
0.05 |
Updates based on 12/8 D3 call |
| 12/17/2008 |
0.06 |
Updated contents of Disclaimer tab |
| 01/15/2009 |
0.07 |
Applied new MEG template; updated content on extending the standard. |
M1.2 Known Issues or Omissions
None.
| Name |
Organization |
Contact Details |
| MISMO Staff |
MISMO |
info@mismo.org |
M1.4 References
Comments
None.
T1. Terms and Conditions
T1.1 Disclaimer
MISMO accepts no liability for the accuracy, adequacy, or completeness of the information contained in this MISMO Engineering Guideline (MEG).
T1.2 Reproduction
Material in this MEG may be reproduced free of charge without obtaining explicit permission from MISMO, provided that the source is acknowledged, the document title given, and the material used in context.
T1.3 Copyright
©2008 MISMO. All material in this MEG is the property of MISMO. All Rights Reserved.