17.3.3.2 contentPart
This element specifies a reference to XML content in a format not defined by ISO/IEC 29500. [Note: This part allows the native use of other commonly used interchange formats, such as:
- MathML (http://www.w3.org/TR/MathML2/)
- SMIL (http://www.w3.org/TR/REC-smil/)
- SVG (http://www.w3.org/TR/SVG11/)
end note]
The relationship type of the explicit relationship specified by this element shall be http://purl.oclc.org/ooxml/officeDocument/relationships/customXml and have a TargetMode attribute value of Internal. If an application cannot process content of the content type specified by the targeted part, then it
should continue to process the file. If possible, it should also provide some indication that unknown content was not imported.
[Example: Consider a WordprocessingML document which includes the following MathML markup in a part named math1.xml:
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
<mml:mi>r</mml:mi>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mi>V</mml:mi>
<mml:mfrac>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>4</mml:mn>
<mml:mi>π</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:msup>
</mml:math>
The Main Document Part would reference this content as follows:
<w:body>
…
<w:p>
<w:r>
<w:contentPart r:id="rId8" />
</w:r>
</w:p>
…
</w:body>
The contentPart element specifies that the content targeted by the relationship with an ID of rId8 is part of the WordprocessingML document. Examining the contents of the corresponding relationship part item, we can see the targets for that relationship:
<Relationships … >
…
<Relationship Id="rId8" TargetMode="Internal"
Type="http://purl.oclc.org/ooxml/officeDocument/relationships/customXml"
Target="math1.xml" />
…
</Relationships>
The corresponding relationship part item shows that the file to be imported is located next to the main document and is named math1.xml. end example]
Attributes
Namespace: http://purl.oclc.or g/ooxml/officeDoc ument/relationshi ps
[Example: Consider an XML element which has the following id attribute:
<… r:id="rId10" />
The markup specifies the associated relationship part with relationship ID rId1 contains the corresponding relationship information for the parent XML element. end example]
The possible values for this attribute are defined by the ST_RelationshipId simple type (22.8.2.1).
id (Relationship to Part)
Specifies the relationship ID to a specified part.
The specified relationship shall match the relationship type required by the parent element:
- http://purl.oclc.org/ooxml/officeDocument/relationships/customXml for the contentPart element
- http://purl.oclc.org/ooxml/officeDocument/relationships/footer for the footerReference element
- http://purl.oclc.org/ooxml/officeDocument/relationships/header for the headerReference element
- http://purl.oclc.org/ooxml/officeDocument/relationships/font for the embedBold, embedBoldItalic, embedItalic, or embedRegular elements
- http://purl.oclc.org/ooxml/officeDocument/relationships/printerSettings for the printerSettings element
- http://purl.oclc.org/ooxml/officeDocument/relationships/hyperlink for the longDesc or hyperlink element
[Note: The W3C XML Schema definition of this element’s content model (CT_Rel) is located in A.1. end note]