Presentation is loading. Please wait.

Presentation is loading. Please wait.

MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Overview of XML Schema Greg Alvord Senior Data Architect, RealEC Chairman Architecture.

Similar presentations


Presentation on theme: "MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Overview of XML Schema Greg Alvord Senior Data Architect, RealEC Chairman Architecture."— Presentation transcript:

1 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Overview of XML Schema Greg Alvord Senior Data Architect, RealEC Chairman Architecture Committee

2 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Agenda Motivation W3C Schema

3 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Motivation For Schema Why Did MISMO switch from DTD to Schema? –W3C Schema did not exist when 2.X Started First goal of V3 was to use schema –DTD does not have data typing –Most Development tools use schema

4 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida DTD does not have data typing V2 Approach. –Date is a string –Implementation Guide states format –Many developers never saw the IG Poorly formed date data huge drain on productivity. V3 Approach –Xsd:date data type format same as V2 recommendation. (ISO 8601) –Test by schema validation

5 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Motivation For Schema Why Should Developers Understand Schema? –Schema is your specifications Structure Data Types Documentation –If your code produces XML Test your output with schema –If your code accepts XML Require schema valid input. Schema validate input –Development –Testing

6 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida A Few Best Practices NEVER make or consume XML as string. Better to use an XML object in whatever library you are using. –XML Objects usually have a serialized string property. Best to use data model object and serialize or de-serialize to XML. –Use.NET XSD.exe to read schema write object model. –Use other similar tools in other platforms.

7 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida MISMO use of Schema XSD Extension on published Schema files xsd: prefix in schema files. Most data in xsd:element –Security attributes –Connecting attributes –Other attributes. XML Encryption XML Signature

8 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida MISMO use of Schema Namespace used –Root file MISMO_3.2.0_B290.xsd <xsd:schema xmlns="http://www.mismo.org/residential/2009/schemas" targetNamespace=http://www.mismo.org/residential/2009/schemashttp://www.mismo.org/residential/2009/schemas Chameleon – xsd:include files –No target namespace –No declared namespace

9 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Namespace Why does it look like a URL? –URL is kind of URI –http: Means we could, but have not yet, make a page available. Why does it contain 2009? –Change Namespace with release –Fixed Namespace (X)

10 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida MISMO use of Schema Some data in xsd:attributes –//LOANS/LOAN/@SequenceNumber –//LOANS/LOAN/@LoanRoleType SubjectLoan – The loan that is the object of the transaction, upon which the receiving business partner will take some action. RelatedLoan – A loan linked to the subject loan by virtue of being collateralized by the same property. Examples include the loan being refinanced, or a HELOC or other subordinate lien collateralized by the same property as the subject loan.

11 MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Sequence And Choice Group xsd:sequence Defines order of element children –Order counts –Lexicographically ordered list Lexicographical order is called “Dictionary order” Capitalizations and white space is ignored. “_” is treated like a space. xsd:choice –Defines exclusive choice –Comes before other elements


Download ppt "MISMO Trimester Meeting January 23-27, 2012 Jacksonville, Florida Overview of XML Schema Greg Alvord Senior Data Architect, RealEC Chairman Architecture."

Similar presentations


Ads by Google