Office Open XML file formats: Difference between revisions

Content deleted Content added
Reverted 1 edit by 217.74.12.99 (talk): Rv incomprehensible addition (TW)
No edit summary
Tags: Mobile edit Mobile web edit
Line 88:
; word/document.xml: This file is the main part for any Word document.
 
=== Relationships ===
 
An example relationship file (''word/_rels/document.xml.rels''), is:
 
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Relationships
xmlns="http://schemas.microsoft.com/package/2005/06/relationships">
<Relationship Id="rId1"
Type="http://schemas.microsoft.com/office/2006/relationships/image"
Target="http://en.wikipedia.org/images/wiki-en.png"
TargetMode="External" />
<Relationship Id="rId2"
Type="http://schemas.microsoft.com/office/2006/relationships/hyperlink"
Target="http://www.wikipedia.org"
TargetMode="External" />
</Relationships>
</source>
 
As such, images referenced in the document can be found in the relationship file by looking for all relationships that are of type <code><nowiki>http://schemas.microsoft.com/office/2006/relationships/image</nowiki></code>. To change the used image, edit the relationship.
 
The following code shows an example of inline markup for a [[hyperlink]]:
 
<source lang="xml">
<w:hyperlink r:id="rId2" w:history="1"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
</source>
 
In this example, the [[Uniform Resource Locator]] (URL) is in the Target attribute of the Relationship referenced through the relationship Id, "rId2" in this case. Linked images, templates, and other items are referenced in the same way.
 
Pictures can be embedded or linked using a tag: