Content Types Stream Markup

The Content Types stream identifies the content type for each package part. The Content Types stream contains XML with a top-level <Types> element, and one or more <Default> and <Override> child elements. <Default> elements define default mappings from the extensions of part names to content types. <Override> elements are used to specify content types on parts that are not covered by, or are not consistent with, the default mappings. Package producers can use pre-defined <Default> elements to reduce the number of <Override> elements on a part, but are not required to do so. [O2.4]

The package implementer shall require that the Content Types stream contain one of the following for every part in the package:

  • One matching <Default> element

  • One matching <Override> element

  • Both a matching <Default> element and a matching <Override> element, in which case the <Override> element takes precedence. [M2.4]

The package implementer shall require that there not be more than one <Default> element for any given extension, and there not be more than one <Override> element for any given part name. [M2.5]

The order of <Default> and <Override> elements in the Content Types stream is not significant.

If the package is intended for streaming consumption:

  • The package implementer should not allow< Default> elements; as a consequence, there should be one <Override> element for each part in the package.

  • The format producer should write the <Override> elements to the package so they appear before the parts to which they correspond, or in close proximity to the part to which they correspond.


The package implementer can define <Default> content type mappings even though no parts use them. [O2.5]