Skip to main content
MISMO Logo

Architecture Workgroup

Go Search
Home
  
MISMO Wiki > Architecture Workgroup > Wiki Pages > MEG0025 Extending the Standard  

MEG0025 Extending the Standard

MEG0025 Extending the Standard

Version: 0.07
Last Updated: 01/15/2009
Status: Ready for Review

Purpose

P1. Purpose

P1.1 Introduction

The EXTENSION container provides maximum flexibility to a given version of a MISMO message by establishing a structured framework for adding data. Organizations can take advantage of XML Namespaces to place required data points not yet defined in the MISMO standard OR proprietary data points that shall never be included in the MISMO standard into a message for exchange with business partners. The definition of the EXTENSION container makes it possible to add additional content yet still validate against the MISMO standardized Schema.

The purpose of this MEG is to provide guidance on how organizations should use the extension structure to include data points not defined within the MISMO data standards.

P1.1 Audience

This MEG was written for the following groups:

  1. MISMO Workgroup members developing MISMO messages.
  2. Designers and users of systems that create and consume the XML instance documents used in Real Estate Finance transactions.
  3. Technical or business professionals wishing to evaluate MISMO specifications.

P1.2 Terminology

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” used in this document are to be interpreted as described in RFC 2119.

1. MUST / REQUIRED: Used when the guideline is an absolute requirement of the specification.

2. MUST NOT: Used when the guideline is an absolute prohibition of the specification.

3. SHOULD / RECOMMENDED: Used when there may exist valid reasons for ignoring the guideline in specific cases. Developers must understand and weigh the full implications of choosing a different course.

4. SHOULD NOT / NOT RECOMMENDED: Used when there may exist valid reasons for ignoring the guideline in specific cases. Developers must understand and weigh the full implications of choosing a different course.

5. MAY / OPTIONAL: Used when adherence to the guideline is at the discretion of the developer.

P1.4 Assumptions

This document reflects the MISMO architecture development principles at the time of writing. It is a living document that is updated as required to reflect the evolving nature of XML technologies and requirements identified by the MISMO constituency.

P1.5 Rationale for this MEG

Organizations often need to exchange data that has not been defined in the MISMO Logical Data Dictionary (LDD) or in a MISMO Schema.
 

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>

C4.2 Question: What if the MISMO list is too long and Acme only wants a subset?

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>

 

Metadata

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.

M1.3 Contacts

Name Organization Contact Details
MISMO Staff MISMO info@mismo.org

M1.4 References

Title Location
RFC2119 http://rfc.net/rfc2119.html

 

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.

Last modified at 8/13/2010 11:10 AM  by MERSEXTERNALAD\administrator