Getting the Content Type of a Part
To get the content type of a part, the package implementer shall perform the following steps [M2.9]:
Compare the part name with the values specified for the
@PartNameattribute of the<Override>elements. The comparison shall be case-insensitive ASCII.If there is an
<Override>element with a matching@PartNameattribute, return the value of its@ContentTypeattribute. No further action is required.If there is no
<Override>element with a matching@PartNameattribute, thenGet the extension from the part name by taking the substring to the right of the rightmost occurrence of the dot character (.) from the rightmost segment.
Check the
<Default>elements of the Content Types stream, comparing the extension with the value of the@Extensionattribute. The comparison shall be case-insensitive ASCII.
If there is a
<Default>element with a matching@Extensionattribute, return the value of its@ContentTypeattribute. No further action is required.If neither
<Override>nor<Default>elements with matching attributes are found for the specified part name, the implementation shall not map this part name to a part.