ndc shopping schema versioning and namespacing proposal
TRANSCRIPT
Simplifying the Business 1 Ó COPYRIGHT IATA 2013
To represent, lead and serve the airline industry
NDC 1.0 Publication: Schema VersioningOverview and NDC 1.0 Namespace Enhancement Proposal for IATA TAG
Simplifying the Business 2 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Design
SCHEMA DESIGN PRINCIPLESNDC 1.0 Publication: Schema Design & Versioning
Simplifying the Business 3 Ó COPYRIGHT IATA 2013
NDC Schema Design Principles Scorecard
Design Principle NDC 1.0
Naming Standards Schema Library Strategy Documentation Standards Versioning Strategy Reuse Strategy
NDC 1.0 Publication Schema Design
Simplifying the Business 4 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
SCHEMA VERSIONINGNDC 1.0 Schema Design & Versioning
Simplifying the Business 5 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
Business/ technical requirements drive new versions of schemas
Typical enhancements include adding and removing schema components
Good schema architectures increases compatibility
Repeatable versioning practice important
Schema Versioning Overview
Simplifying the Business 6 Ó COPYRIGHT IATA 2013
XML Schema has no inherent notion of versioning
Schema can be enhanced in three ways Major Change (backward-incompatible) Minor Change (backward-compatible) Document Revisions (backward-compatible)
Enhancement type indicates schema compatibility1. Backward Compatibility2. Forward Compatibility
NDC 1.0 Publication Schema Versioning
Schema Enhancement Versioning Overview
Simplifying the Business 7 Ó COPYRIGHT IATA 2013
Backward-Compatibility Overview
The ideal schema enhancement design goalProvides backward-compatibility of the
schemas from one version to the nextThis is possible if you are only adding optional
new components and/or reducing restrictiveness
NDC 1.0 Publication Schema Compatibility
Simplifying the Business 8 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Compatibility
• Adding optional elements and attributes
• Making required elements and attributes optional
• Making occurrence constraints less restrictive
• Turning specific element declarations into choice groups
• Making simple types less restrictive
• Turning a simple type into a union
• Adding optional wildcards or open content
• Replacing element or attribute declarations with wildcards
• Turning a sequence group into an all group or a repeating choice group
Backward-Compatible Schema Changes
Simplifying the Business 9 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Compatibility
• Changing the order of elements or imposing an order
• Changing the structure of elements
• Removing any element or attribute declarations
• Removing wildcards or open content
• Changing the names of any elements or attributes
• Changing the target namespace of the schema
• Adding any required elements or attributes
• Making optional elements or attributes required
• Making occurrence constraints more restrictive
• Making simple types more restrictive
Backward-Incompatible Schema Changes
Simplifying the Business 10 Ó COPYRIGHT IATA 2013
Forward Compatibility Overview
Part of an advanced schema design & versioning strategy
Forward-compatible schemas allow a version “2.1” instance to be valid according to the version “2.0” schema
Not provided in NDC 1.0 schema
NDC 1.0 Publication Schema Compatibility
Simplifying the Business 11 Ó COPYRIGHT IATA 2013
Schema Versioning Best Practices
Version number format Two numbers separated by a period
“2” represents the major version number “1” represents the minor version number
Every schema has a version number Using both major and minor version
numbers Version number placement
Schema documents XML Instances Namespace names
NDC 1.0 Publication Schema Versioning
2.0
2.1
2.2
backward-compatible
3.0
3.1
3.2
backward-compatible
backward-incompatible
Simplifying the Business 12 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
NDC 1.0 Schema Versioning Scorecard
Versioning Method/ Practice NDC 1.0
Repeatable versioning practice Major/ Minor numbering format Version represented in schema documents Version represented in xml instances Version represented in namespace name
Simplifying the Business 13 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
NDC 1.0 schema uses the @version attribute in schema preamble
NDC Version Representation in Schema Documents
Represents the version of the schema (e.g. vocabulary being described by the schema document)
Strictly for implementer documentation
XML Schema processor does not use it
Simplifying the Business 14 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
NDC 1.0 Use of Schema Preamble @version Examples
setting description
<xsd:schema version=“0.9”> Pre-publication
<xsd:schema version=“1.0”> First publication
<xsd:schema version=“1.1”> Second publication: schema changed-compatibility kept
<xsd:schema version=“2.0”> Fourth publication: schema changed-compatibility lost
Simplifying the Business 15 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
NDC 1.0 schema uses of the @id attribute in schema preamble
@id attribute represents publication version Represented as namespace
sub-location + 4 digit year + publication number
RQ/RS message schema contain the current publication id
Common (shared) schema contain the compatible publication range Range includes earliest to most
current compatible publication(s) No space included between
publication range
NDC Version Representation in Schema Documents
Simplifying the Business 16 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
NDC 1.0 Use of Schema Preamble @id Examples
Description Message Schema Common Schema
First (schema compatible) publication
<xsd:schema id=NDC2014.1> <xsd:schema id=NDC2014.1>
Second (schema compatible) publication
<xsd:schema id=“NDC2014.2”> <xsd:schema id=“NDC2014.1NDC2014.2”>
Third (schema compatible) publication
<xsd:schema id=“NDC2014.1> <xsd:schema id=“NDC2014.1NDC2015.1”>
Break in publication compatibility
<xsd:schema id=“NDC2015.1> <xsd:schema id=“NDC2015.1NDC2015.2”>
Simplifying the Business 17 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Schema Versioning
NDC 1.0 schema includes a Version attribute in schema payload standard attributes
NDC Version Numbers in Instances
Allows implementers to specify schema version at root level of instance document
Simplifying the Business 18 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Overview
NAMESPACE OVERVIEWNDC 1.0 Publication Versioning
Simplifying the Business 19 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Overview
Namespace Overview: In a Nutshell…
NDC implementer applications will tend to be complex
NDC itself combines elements from various document types
Two document types often have elements with the same name but different meanings and semantics
XML namespaces overcome this challenge and give developers a warm and fuzzy feeling
Simplifying the Business 20 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Overview
Namespace Purpose
To support combining various XML elements from different document types into one XML document
To provide a unique name that can be associated with a particular person or organization
Not to point to a location where a resource resides
NDC uses namespaces to enforce our personalized XML vocabulary… while allowing
implementers to do the same.
Traveler
Traveler
Simplifying the Business 21 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Overview
Namespace names are Uniform Resource Identifiers (URIs)
XML elements are given qualified names (QNames)
Attributes don’t use namespaces
Namespace Overview: How They Work
The xmlns attribute is used to specify each namespace prefix
IATA NDC Common Vocabulary Namespace
IATA NDC Message Namespace
W3C Namespace
Simplifying the Business 22 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Overview
Namespace Overview: How They Work
Namespace names are case-sensitive Two namespaces are
considered different if their capitalization is different
A namespace name should be unique
Namespace prefixes A namespace prefix serves
as a proxy for the namespace
“nc” is the namespace prefix for NDC Common and Simple Types
Namespace Prefix
Simplifying the Business 23 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Overview
Pre-Publication <xsd:schema targetNamespace=“http://www.iata.org/NDC” version=“0.9” id=“NDCBETA”>
First Publication <xsd:schema targetNamespace=“http://www.iata.org/NDC” version=“1.0” id=“NDC2014.1”>
Second Publication: schema changed, backward-compatible <xsd:schema targetNamespace=“http://www.iata.org/NDC” version=“1.1” id=“NDC2014.2”>
Third Publication: schema changed, backward-incompatible <xsd:schema targetNamespace=“http://www.iata.org/NDC” version=“2.0” id=“NDC2015.1”>
NDC 1.0: Current Use of Schema Namespace Examples
IATA URL NDC Service Domain
NDC Message Schema
Simplifying the Business 24 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Overview
Pre-Publication <xsd:schema targetNamespace=“http://www.iata.org/NDC/common” version=“0.9”
id=“NDCBETA”> First Publication
<xsd:schema targetNamespace=“http://www.iata.org/NDC/common” version=“1.0” id=“NDC2014.1”>
Second Publication: schema changed, backward-compatible <xsd:schema targetNamespace=“http://www.iata.org/NDC/common” version=“1.1”
id=“NDC2014.1NDC2014.2”> Third Publication: schema changed, backward-incompatible
<xsd:schema targetNamespace=“http://www.iata.org/NDC/common” version=“2.0” id=“NDC2015.1”>
NDC 1.0: Current Use of Schema Namespace Examples
IATA URL NDC Service Domain
NDC Common Vocabulary Identifier
NDC Common Schema
Simplifying the Business 25 Ó COPYRIGHT IATA 2013
NDC NAMESPACE ENHANCEMENT PROPOSAL
NDC Schema Versioning with Namespacing
NDC 1.0 Publication Namespace Proposal
Simplifying the Business 26 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Proposal
Current NDC Namespacing
http://www.iata.org/NDC
http://www.iata.org/IATA/NDC/common
IATA URL NDC Service Domain
NDC Common Vocabulary Identifier
Simplifying the Business 27 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Proposal
Proposal: Include Major Version Number in NDC Namespace Name
Process Benefits
Make the version information an immediate property of the schema by only indicating the MAJOR version number in the namespace name
Makes the version information an immediate property of the schema
Desirable in the case of a major release where there is no intention of backward compatibility
Allows message (RQ/RS) versus common schema to be separately versioned and reflected in imported schema
Instantly breaks backward compatibility between schema versions
Supports life-cycle versioning of other NDC non-schema artifacts (e.g. WSDL)
Informs namespace aware applications that process instances need to change
Faster and easier routing for systems that handle multiple versions of one service as payload parsing not required
Note: Not used for minor releases as they are backward-compatible
Simplifying the Business 28 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Proposal
NDC 1.0 Use of Version Number in Namespace Examples (1/2)
First publicationMessage schemaand common types share same version
Simplifying the Business 29 Ó COPYRIGHT IATA 2013
NDC 1.0 Publication Namespace Proposal
NDC 1.0 Use of Version Number in Namespace Examples (2/2)
Subsequent publicationMessage schema enhancements are backward-compatible, but common types enhancements are backward-incompatible