110 likes | 207 Views
Extensions in 3.2. Greg Alvord RealEC June 4, 2012. New Extensions in 3.2. Any Element can have attributes from other namespaces Any CONTAINER Any Data Point. Use case 1. Two Trading partners want to use MISMO Both Partner have needs beyond MISMO scope. Two Partners. Options
E N D
Extensions in 3.2 Greg Alvord RealEC June 4, 2012
New Extensions in 3.2 • Any Element can have attributes from other namespaces • Any CONTAINER • Any Data Point
Use case 1 • Two Trading partners want to use MISMO • Both Partner have needs beyond MISMO scope.
Two Partners • Options • Edit the MISMO schema • Places things in MISMO namespace that does not belong • Use extensions • Adds three new files • Never touches MISMO files.
Compare and Contrast MISMO Schema File Set Extended File Set Root File MISMO_3.2.0_B291AcmeAjax.xsd Use MISMO data types? MISMODataTypesB291.xsd Use MISMO enumerations? MISMOEnumeratedTypesB291.xsd Use MISMO data points / containers MISMOComplexTypesB291.xsd Acme Extension Acme.xsd Ajax Extension Ajax.xsd • Root File • MISMO_3.2.0_B291.xsd • Support Files • MISMODataTypesB291.xsd • MISMOEnumeratedTypesB291.xsd • MISMOComplexTypesB291.xsd • MISMOComplexTypeExtensionsB291.xsd • External File • xlink.xsd
The Steps • Create a file in the MISMO namespace • MISMO_3.1.0_B288AcmeAjax.xsd • Import all the required pieces • Redefine the MISMO definitions • For each container that needs more data redefine the *_EXTENSION container • *_EXTENSION allows any valid XML • Redefinition will Restrict down to the desired design.
The content of *_EXTENSION • Before redefinition • MISMO element ( Allows anything from MISMO name space) • OTHER element (Allows anything from anything except MISMO namespace) • After redefinition • MISMO element ( Allows anything) • OTHER element defined in the Acme name space
Use case 2 • Two Trading partners want to use MISMO • Both Partner have needs beyond MISMO scope. • They both want to extend Borrower Detail
Use case 3 • Acme wants to require some data and limit size of things that Ajax sends
How to use for other restrictions • Use Redefine to • Restrict the length of fields • Add required fields
Questions? Greg Alvord 713-829-5197 Gregory.Alvord@RealEC.com Greg.Alvord@gmail.com