<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PeterKelly</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PeterKelly"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/PeterKelly"/>
	<updated>2026-12-06T01:30:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML/Lists_and_Numbering&amp;diff=235494</id>
		<title>OOXML/WordProcessingML/Lists and Numbering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML/Lists_and_Numbering&amp;diff=235494"/>
		<updated>2014-07-31T14:49:02Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: /* Numbered paragraphs */ Attempt to fix paragraph breaks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most markup languages like HTML, LaTeX, and ODF text documents have an explicit notion of lists and headings. That is, a &amp;#039;&amp;#039;&amp;#039;list&amp;#039;&amp;#039;&amp;#039; is a container for a sequence of &amp;#039;&amp;#039;&amp;#039;items&amp;#039;&amp;#039;&amp;#039;, each of which in turn is a container for a sequence of paragraphs or sublists. Similarly, headings and heading levels are expressed via some combination of element names and attributes. WordProcessingML differs substantially from this approach, using a more general notion of &amp;#039;&amp;#039;&amp;#039;numbered paragraphs&amp;#039;&amp;#039;&amp;#039;&amp;#039; which result in the same visual rendering, but avoid including structural information directly within the actual content.&lt;br /&gt;
&lt;br /&gt;
== Numbered paragraphs ==&lt;br /&gt;
&lt;br /&gt;
A numbered paragraph is one which has a &amp;#039;&amp;#039;&amp;#039;numbering definition&amp;#039;&amp;#039;&amp;#039; associated with it. These act like counters in CSS, incrementing each time they are used. All paragraphs in a document associated with a particular numbering definition will be given consecutive numbers. They do not have to appear consecutively, but may be spread throughout a document.&lt;br /&gt;
&lt;br /&gt;
A simple, non-nested list, with only one paragraph per item is represented simply as a sequence of paragraphs that share the same, unique numbering definition (that is not used elsewhere in a document). Because the displayed number increments each time, the paragraphs will be numbered 1, 2, 3, etc. The format used for the numbers can either be numeric (arabic digits, roman numerals, letters of the alphabet), or symbolic (a bullet point, square, or tick). Thus, this scheme is used for what HTML calls ordered and unordered lists.&lt;br /&gt;
&lt;br /&gt;
All headings in a document, if they are numbered, use the same numbering definition. Since the counting for a given numbering definition applies across all instances of associated paragraphs throughout the document, this results in all sections being numbered correctly, even though they have other paragraphs between them.&lt;br /&gt;
&lt;br /&gt;
Nesting is achieved using &amp;#039;&amp;#039;&amp;#039;numbering levels&amp;#039;&amp;#039;&amp;#039;. Every numbered paragraph has a numbering level, which defaults to 0. For a nested list, the top-level items would be paragraphs with a numbering level of 0, and sublists would have items with numbering levels of 1 or higher, depending on their levels of nesting. For headings, in the case of a book for example, chapters would be level 0, sections level 1, and subsections level 2. The format of the number displayed for a particular combination of numbering definition and level can be customised to include those from higher levels, e.g. a subsection in a book which is numbered 8.2.5, indicating chapter 8, section 2, subsection 5.&lt;br /&gt;
&lt;br /&gt;
The numbering definition and level for a given paragraph may either be specified either directly as part of the paragraph properties, or indirectly as part of a style. List numbering is normally specified directly, while heading numbering is normally specified via styles.&lt;br /&gt;
&lt;br /&gt;
== Numbering definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recovering structure ==&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML/Lists_and_Numbering&amp;diff=235493</id>
		<title>OOXML/WordProcessingML/Lists and Numbering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML/Lists_and_Numbering&amp;diff=235493"/>
		<updated>2014-07-31T14:46:47Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: /* Numbered paragraphs */ Attempt to fix paragraph separation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most markup languages like HTML, LaTeX, and ODF text documents have an explicit notion of lists and headings. That is, a &amp;#039;&amp;#039;&amp;#039;list&amp;#039;&amp;#039;&amp;#039; is a container for a sequence of &amp;#039;&amp;#039;&amp;#039;items&amp;#039;&amp;#039;&amp;#039;, each of which in turn is a container for a sequence of paragraphs or sublists. Similarly, headings and heading levels are expressed via some combination of element names and attributes. WordProcessingML differs substantially from this approach, using a more general notion of &amp;#039;&amp;#039;&amp;#039;numbered paragraphs&amp;#039;&amp;#039;&amp;#039;&amp;#039; which result in the same visual rendering, but avoid including structural information directly within the actual content.&lt;br /&gt;
&lt;br /&gt;
== Numbered paragraphs ==&lt;br /&gt;
&lt;br /&gt;
A numbered paragraph is one which has a &amp;#039;&amp;#039;&amp;#039;numbering definition&amp;#039;&amp;#039;&amp;#039; associated with it. These act like counters in CSS, incrementing each time they are used. All paragraphs in a document associated with a particular numbering definition will be given consecutive numbers. They do not have to appear consecutively, but may be spread throughout a document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A simple, non-nested list, with only one paragraph per item is represented simply as a sequence of paragraphs that share the same, unique numbering definition (that is not used elsewhere in a document). Because the displayed number increments each time, the paragraphs will be numbered 1, 2, 3, etc. The format used for the numbers can either be numeric (arabic digits, roman numerals, letters of the alphabet), or symbolic (a bullet point, square, or tick). Thus, this scheme is used for what HTML calls ordered and unordered lists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All headings in a document, if they are numbered, use the same numbering definition. Since the counting for a given numbering definition applies across all instances of associated paragraphs throughout the document, this results in all sections being numbered correctly, even though they have other paragraphs between them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nesting is achieved using &amp;#039;&amp;#039;&amp;#039;numbering levels&amp;#039;&amp;#039;&amp;#039;. Every numbered paragraph has a numbering level, which defaults to 0. For a nested list, the top-level items would be paragraphs with a numbering level of 0, and sublists would have items with numbering levels of 1 or higher, depending on their levels of nesting. For headings, in the case of a book for example, chapters would be level 0, sections level 1, and subsections level 2. The format of the number displayed for a particular combination of numbering definition and level can be customised to include those from higher levels, e.g. a subsection in a book which is numbered 8.2.5, indicating chapter 8, section 2, subsection 5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The numbering definition and level for a given paragraph may either be specified either directly as part of the paragraph properties, or indirectly as part of a style. List numbering is normally specified directly, while heading numbering is normally specified via styles.&lt;br /&gt;
&lt;br /&gt;
== Numbering definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recovering structure ==&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML/Lists_and_Numbering&amp;diff=235492</id>
		<title>OOXML/WordProcessingML/Lists and Numbering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML/Lists_and_Numbering&amp;diff=235492"/>
		<updated>2014-07-31T14:45:12Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Overview of numbering&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most markup languages like HTML, LaTeX, and ODF text documents have an explicit notion of lists and headings. That is, a &amp;#039;&amp;#039;&amp;#039;list&amp;#039;&amp;#039;&amp;#039; is a container for a sequence of &amp;#039;&amp;#039;&amp;#039;items&amp;#039;&amp;#039;&amp;#039;, each of which in turn is a container for a sequence of paragraphs or sublists. Similarly, headings and heading levels are expressed via some combination of element names and attributes. WordProcessingML differs substantially from this approach, using a more general notion of &amp;#039;&amp;#039;&amp;#039;numbered paragraphs&amp;#039;&amp;#039;&amp;#039;&amp;#039; which result in the same visual rendering, but avoid including structural information directly within the actual content.&lt;br /&gt;
&lt;br /&gt;
== Numbered paragraphs ==&lt;br /&gt;
&lt;br /&gt;
A numbered paragraph is one which has a &amp;#039;&amp;#039;&amp;#039;numbering definition&amp;#039;&amp;#039;&amp;#039; associated with it. These act like counters in CSS, incrementing each time they are used. All paragraphs in a document associated with a particular numbering definition will be given consecutive numbers. They do not have to appear consecutively, but may be spread throughout a document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A simple, non-nested list, with only one paragraph per item is represented simply as a sequence of paragraphs that share the same, unique numbering definition (that is not used elsewhere in a document). Because the displayed number increments each time, the paragraphs will be numbered 1, 2, 3, etc. The format used for the numbers can either be numeric (arabic digits, roman numerals, letters of the alphabet), or symbolic (a bullet point, square, or tick). Thus, this scheme is used for what HTML calls ordered and unordered lists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All headings in a document, if they are numbered, use the same numbering definition. Since the counting for a given numbering definition applies across all instances of associated paragraphs throughout the document, this results in all sections being numbered correctly, even though they have other paragraphs between them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nesting is achieved using &amp;#039;&amp;#039;&amp;#039;numbering levels&amp;#039;&amp;#039;&amp;#039;. Every numbered paragraph has a numbering level, which defaults to 0. For a nested list, the top-level items would be paragraphs with a numbering level of 0, and sublists would have items with numbering levels of 1 or higher, depending on their levels of nesting. For headings, in the case of a book for example, chapters would be level 0, sections level 1, and subsections level 2. The format of the number displayed for a particular combination of numbering definition and level can be customised to include those from higher levels, e.g. a subsection in a book which is numbered 8.2.5, indicating chapter 8, section 2, subsection 5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The numbering definition and level for a given paragraph may either be specified either directly as part of the paragraph properties, or indirectly as part of a style. List numbering is normally specified directly, while heading numbering is normally specified via styles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Numbering definitions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recovering structure ==&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML&amp;diff=235491</id>
		<title>OOXML/WordProcessingML</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML&amp;diff=235491"/>
		<updated>2014-07-31T14:04:20Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WordProcessingML is the schema used for representing text documents in OOXML. Every .docx file contains a single WordProcessingML document, which plays the same role as content.xml in ODF.&lt;br /&gt;
&lt;br /&gt;
Microsoft Word normally saves the file as &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, however you should not rely this always being the filename - instead, the filename should be determined based on the [[OOXML/Open_Packaging_Conventions_(OPC)|OPC relationship structure]].&lt;br /&gt;
&lt;br /&gt;
All elements and attributes in WordProcessingML are in the following namespace, which the examples here associate with the &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OOXML/WordProcessingML/Styles|Styles]]&lt;br /&gt;
* [[OOXML/WordProcessingML/Formatting|Formatting]]&lt;br /&gt;
* [[OOXML/WordProcessingML/Lists_and_Numbering|Lists and Numbering]]&lt;br /&gt;
&lt;br /&gt;
== Basic structure ==&lt;br /&gt;
&lt;br /&gt;
The three most important elements in WordProcessingML are paragraphs, runs, and tables.&lt;br /&gt;
&lt;br /&gt;
A run is a piece of text or other inline content (such as an image) which has a particular set of formatting properties associated with it. Unlike in HTML and ODF, runs cannot be nested - paragraphs have a &amp;quot;flat&amp;quot; structure. If different formatting is applied to different parts of the paragraph, then each will be placed in a separate run.&lt;br /&gt;
&lt;br /&gt;
Tables are represented in a row-primary format in a very similar manner to HTML. A table element contains one or more row elements, and a row element contains one or more cell elements. Each cell element contains block-level content, such as paragraphs or other tables.&lt;br /&gt;
&lt;br /&gt;
Paragraphs are represented using the &amp;lt;code&amp;gt;&amp;lt;w:p&amp;gt;&amp;lt;/code&amp;gt; elements, runs using &amp;lt;code&amp;gt;&amp;lt;w:r&amp;gt;&amp;lt;/code&amp;gt; elements, and tables using &amp;lt;code&amp;gt;&amp;lt;w:table&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;w:tr&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;lt;w:tc&amp;gt;&amp;lt;/code&amp;gt; elements. At the outer level, all of the content resides inside a nested pair of &amp;lt;code&amp;gt;&amp;lt;w:document&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;w:body&amp;gt;&amp;lt;/code&amp;gt; elements.&lt;br /&gt;
&lt;br /&gt;
Here is the simplest possible WordProcessingML document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:document xmlns:w=&amp;quot;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;w:body&amp;gt;&lt;br /&gt;
    &amp;lt;w:p&amp;gt;&lt;br /&gt;
      &amp;lt;w:r&amp;gt;&lt;br /&gt;
        &amp;lt;w:t&amp;gt;Hello World&amp;lt;/w:t&amp;gt;&lt;br /&gt;
      &amp;lt;/w:r&amp;gt;&lt;br /&gt;
    &amp;lt;/w:p&amp;gt;&lt;br /&gt;
  &amp;lt;/w:body&amp;gt;&lt;br /&gt;
&amp;lt;/w:document&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formatting and other information about particular elements is stored in &amp;quot;property&amp;quot; elements, which contain a series of child elements, one per property. These are mostly analogous to attributes and CSS properties in HTML, though in some cases a child element may have multiple properties. Paragraphs, runs, and tables may each begin with a &amp;lt;code&amp;gt;&amp;lt;w:pPr&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;lt;w:tblPr&amp;gt;&amp;lt;/code&amp;gt; element, respectively.&lt;br /&gt;
&lt;br /&gt;
Here is a document with a single center-aligned paragraph, and bold text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:document xmlns:w=&amp;quot;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;w:body&amp;gt;&lt;br /&gt;
    &amp;lt;w:p&amp;gt;&lt;br /&gt;
      &amp;lt;w:pPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:jc w:val=&amp;quot;center&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
          &amp;lt;w:u w:val=&amp;quot;single&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;/w:pPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:r&amp;gt;&lt;br /&gt;
        &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
          &amp;lt;w:u w:val=&amp;quot;single&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:t&amp;gt;Hello World&amp;lt;/w:t&amp;gt;&lt;br /&gt;
      &amp;lt;/w:r&amp;gt;&lt;br /&gt;
    &amp;lt;/w:p&amp;gt;&lt;br /&gt;
  &amp;lt;/w:body&amp;gt;&lt;br /&gt;
&amp;lt;/w:document&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There, the children of the &amp;lt;code&amp;gt;&amp;lt;w:pPr&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt; elements both have a value attribute, as these properties require parameters to be specified (the type of alignment, and the style of underline). Some property elements have additional attributes, and some require none.&lt;br /&gt;
&lt;br /&gt;
Note that there are two &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt; elements - one within the &amp;lt;code&amp;gt;&amp;lt;w:pPr&amp;gt;&amp;lt;/code&amp;gt; element, and another within the run itself. The first isn&amp;#039;t strictly necessary for this case; it applies not to the text within the paragraph, but to the &amp;quot;paragraph marker&amp;quot; at the end. Apparently, this is supposed to influence appearance of the paragraph marker (¶ symbol); Word 2011 and 2013 both add this element but then ignore it. The first &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt; is unnecessary in practice; only the latter affects the text.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Office_Open_XML&amp;diff=235476</id>
		<title>Office Open XML</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Office_Open_XML&amp;diff=235476"/>
		<updated>2014-07-24T07:28:40Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Minor wording clarification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Office Open XML (OOXML) is an XML-based file format used for representing word processing documents, spreadsheets, and presentations. It is conceptually similar to ODF in many respects, though a lot of the details differ. OOXML was created by Microsoft and has been used as the default format in all versions of Office since 2007. It has been published as a standard as both ISO 29500 and ECMA-376.&lt;br /&gt;
&lt;br /&gt;
The official specifications for OOXML, which come in four parts, are available here (search for &amp;quot;29500&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html&lt;br /&gt;
&lt;br /&gt;
There are two versions of OOXML - &amp;quot;Strict&amp;quot; and &amp;quot;Transitional&amp;quot;. The former is a subset of the latter, and excludes certain legacy features that the latter retains to facilitate conversion from the older binary formats. Currently, OOXML Transitional is the only variant in widespread use; OOXML Strict is only fully supported in Office 2013 for Windows, though Office 2010 contains the ability to read (but not write) Strict documents.&lt;br /&gt;
&lt;br /&gt;
OOXML documents of both variants use the .docx, .xlsx, and .pptx extensions for word processing documents, spreadsheets, and presentations, respectively. Thus it is easy to tell the difference between an OOXML file and the older MS Office binary format, which uses .doc, .xls, and .ppt.&lt;br /&gt;
&lt;br /&gt;
The following pages describe various aspects of the standard:&lt;br /&gt;
&lt;br /&gt;
* [[OOXML/Open_Packaging_Conventions_(OPC)|Open Packaging Conventions (OPC)]]&lt;br /&gt;
* [[OOXML/Markup_Compatibility_and_Extensibility|Markup Compatibility and Extensibility]]&lt;br /&gt;
* [[OOXML/WordProcessingML|WordProcessingML]]&lt;br /&gt;
* [[OOXML/SpreadsheetML|SpreadsheetML]]&lt;br /&gt;
* [[OOXML/PresentationML|PresentationML]]&lt;br /&gt;
* [[OOXML/DrawingML|DrawingML]]&lt;br /&gt;
* [[OOXML/Vector_Markup_Language_(VML)|Vector Markup Language (VML)]]&lt;br /&gt;
&lt;br /&gt;
==Status==&lt;br /&gt;
A new import filter is currently (as of May 2014) in development.  Its design and implementation is described on this page.  The legacy importer and exporter is described [[Office_Open_XML/Legacy_Implementation|here]].&lt;br /&gt;
&lt;br /&gt;
The new OOXML import framework is currently in the design stage.  Development is about to begin.&lt;br /&gt;
&lt;br /&gt;
Progress/Todo:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;text-align:left;&amp;quot;|What&lt;br /&gt;
!Who&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|Create new main/ooxml/ module and setup initial build files&lt;br /&gt;
|Andre&lt;br /&gt;
|In progress&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|Specifications&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Collect a list of the relevant schema files.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Determine legal status of OOXML schemas.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Setup map of different specification variants and applications.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Write the schema parser&lt;br /&gt;
|Andre&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|DSL parser&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Finialize DSL design&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Implement DSL parser&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Implement OOXML parser generator&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Migrate existing PresentationML import&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
The file format is described by several documents:&lt;br /&gt;
* Specifications:&lt;br /&gt;
** ISO 29500:2012    (http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=61750)&lt;br /&gt;
** ISO 29500:2008&lt;br /&gt;
** ECMA-376          (http://www.ecma-international.org/publications/standards/Ecma-376.htm)&lt;br /&gt;
** (ECMA) TC-45      (http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm)&lt;br /&gt;
* Microsoft Extensions ([http://msdn.microsoft.com/en-us/library/gg548604%28v=office.12%29.aspx Overview]):&lt;br /&gt;
** for PowerPoint (http://msdn.microsoft.com/en-us/library/dd926741%28v=office.12%29.aspx)&lt;br /&gt;
&lt;br /&gt;
There are three main markup languages (MLs) for the three main applications:&lt;br /&gt;
* WordprocessingML&lt;br /&gt;
* SpreadsheetML&lt;br /&gt;
* PresentationML&lt;br /&gt;
Markup languages that are shared by all applications are&lt;br /&gt;
* DrawingML&lt;br /&gt;
* VML (for legacy files)&lt;br /&gt;
&lt;br /&gt;
OOXML files are, similar to ODF files, ZIP containers with one entry per XML stream.  OOXML calls these entries parts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Framework==&lt;br /&gt;
A new framework for the import of OOXML documents is designed to make the import code based on this framework easy to read and easy to develop.  In a compile time pre-processing step the OOXML schema files are read and turned into the OOXML parser skeleton.  A domain specific language (DSL) can then be used to provide the implementation for specific elements (complex types) of the OOXML format.&lt;br /&gt;
&lt;br /&gt;
Details can be found on the [[OOXML Framework]] page.&lt;br /&gt;
&lt;br /&gt;
[[Category:Office Open XML]]&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML&amp;diff=235475</id>
		<title>OOXML/WordProcessingML</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/WordProcessingML&amp;diff=235475"/>
		<updated>2014-07-23T20:44:03Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WordProcessingML is the schema used for representing text documents in OOXML. Every .docx file contains a single WordProcessingML document, which plays the same role as content.xml in ODF.&lt;br /&gt;
&lt;br /&gt;
Microsoft Word normally saves the file as &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, however you should not rely this always being the filename - instead, the filename should be determined based on the [[OOXML/Open_Packaging_Conventions_(OPC)|OPC relationship structure]].&lt;br /&gt;
&lt;br /&gt;
All elements and attributes in WordProcessingML are in the following namespace, which the examples here associate with the &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; prefix:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[OOXML/WordProcessingML/Styles|Styles]]&lt;br /&gt;
* [[OOXML/WordProcessingML/Formatting|Formatting]]&lt;br /&gt;
&lt;br /&gt;
== Basic structure ==&lt;br /&gt;
&lt;br /&gt;
The three most important elements in WordProcessingML are paragraphs, runs, and tables.&lt;br /&gt;
&lt;br /&gt;
A run is a piece of text or other inline content (such as an image) which has a particular set of formatting properties associated with it. Unlike in HTML and ODF, runs cannot be nested - paragraphs have a &amp;quot;flat&amp;quot; structure. If different formatting is applied to different parts of the paragraph, then each will be placed in a separate run.&lt;br /&gt;
&lt;br /&gt;
Tables are represented in a row-primary format in a very similar manner to HTML. A table element contains one or more row elements, and a row element contains one or more cell elements. Each cell element contains block-level content, such as paragraphs or other tables.&lt;br /&gt;
&lt;br /&gt;
Paragraphs are represented using the &amp;lt;code&amp;gt;&amp;lt;w:p&amp;gt;&amp;lt;/code&amp;gt; elements, runs using &amp;lt;code&amp;gt;&amp;lt;w:r&amp;gt;&amp;lt;/code&amp;gt; elements, and tables using &amp;lt;code&amp;gt;&amp;lt;w:table&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;w:tr&amp;gt;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;&amp;lt;w:tc&amp;gt;&amp;lt;/code&amp;gt; elements. At the outer level, all of the content resides inside a nested pair of &amp;lt;code&amp;gt;&amp;lt;w:document&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;w:body&amp;gt;&amp;lt;/code&amp;gt; elements.&lt;br /&gt;
&lt;br /&gt;
Here is the simplest possible WordProcessingML document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:document xmlns:w=&amp;quot;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;w:body&amp;gt;&lt;br /&gt;
    &amp;lt;w:p&amp;gt;&lt;br /&gt;
      &amp;lt;w:r&amp;gt;&lt;br /&gt;
        &amp;lt;w:t&amp;gt;Hello World&amp;lt;/w:t&amp;gt;&lt;br /&gt;
      &amp;lt;/w:r&amp;gt;&lt;br /&gt;
    &amp;lt;/w:p&amp;gt;&lt;br /&gt;
  &amp;lt;/w:body&amp;gt;&lt;br /&gt;
&amp;lt;/w:document&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formatting and other information about particular elements is stored in &amp;quot;property&amp;quot; elements, which contain a series of child elements, one per property. These are mostly analogous to attributes and CSS properties in HTML, though in some cases a child element may have multiple properties. Paragraphs, runs, and tables may each begin with a &amp;lt;code&amp;gt;&amp;lt;w:pPr&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;lt;w:tblPr&amp;gt;&amp;lt;/code&amp;gt; element, respectively.&lt;br /&gt;
&lt;br /&gt;
Here is a document with a single center-aligned paragraph, and bold text:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:document xmlns:w=&amp;quot;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;w:body&amp;gt;&lt;br /&gt;
    &amp;lt;w:p&amp;gt;&lt;br /&gt;
      &amp;lt;w:pPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:jc w:val=&amp;quot;center&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
          &amp;lt;w:u w:val=&amp;quot;single&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;/w:pPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:r&amp;gt;&lt;br /&gt;
        &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
          &amp;lt;w:u w:val=&amp;quot;single&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:t&amp;gt;Hello World&amp;lt;/w:t&amp;gt;&lt;br /&gt;
      &amp;lt;/w:r&amp;gt;&lt;br /&gt;
    &amp;lt;/w:p&amp;gt;&lt;br /&gt;
  &amp;lt;/w:body&amp;gt;&lt;br /&gt;
&amp;lt;/w:document&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There, the children of the &amp;lt;code&amp;gt;&amp;lt;w:pPr&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt; elements both have a value attribute, as these properties require parameters to be specified (the type of alignment, and the style of underline). Some property elements have additional attributes, and some require none.&lt;br /&gt;
&lt;br /&gt;
Note that there are two &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt; elements - one within the &amp;lt;code&amp;gt;&amp;lt;w:pPr&amp;gt;&amp;lt;/code&amp;gt; element, and another within the run itself. The first isn&amp;#039;t strictly necessary for this case; it applies not to the text within the paragraph, but to the &amp;quot;paragraph marker&amp;quot; at the end. Apparently, this is supposed to influence appearance of the paragraph marker (¶ symbol); Word 2011 and 2013 both add this element but then ignore it. The first &amp;lt;code&amp;gt;&amp;lt;w:rPr&amp;gt;&amp;lt;/code&amp;gt; is unnecessary in practice; only the latter affects the text.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235474</id>
		<title>OOXML/Open Packaging Conventions (OPC)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235474"/>
		<updated>2014-07-23T19:51:02Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: /* Implementation considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Like ODF, OOXML documents are &amp;#039;&amp;#039;containers&amp;#039;&amp;#039;, stored physically as zip archives. Most of the files in the archive are in XML format, though binary files may be included in specific cases (e.g. for images).&lt;br /&gt;
&lt;br /&gt;
Each OOXML document has certain files that serve a particular role, such as the document content, stylesheet, metadata, and so forth. However, instead of simply using fixed path names within the archive (as ODF does), a part of the OOXML specification called &amp;#039;&amp;#039;&amp;#039;Open Packaging Conventions (OPC)&amp;#039;&amp;#039;&amp;#039; defines an additional layer of abstraction on top of the zip directory, which must be consulted to determine the actual paths at which certain files can be found.&lt;br /&gt;
&lt;br /&gt;
== Root relationships ==&lt;br /&gt;
&lt;br /&gt;
Each file inside an OPC package is called a &amp;#039;&amp;#039;&amp;#039;part&amp;#039;&amp;#039;&amp;#039;, and these are arrange as a directed graph - similar, but theoretically more flexible than a traditional directory tree. The graph&amp;#039;s vertices are parts (files), and edges are relationships. The set of outward relationships for a given part is stored as XML, in a file whose name is derived from the filename of the part.&lt;br /&gt;
&lt;br /&gt;
To give a concrete example, let&amp;#039;s consider the case of an empty document created in Word 2011 for Mac. This document has the following package structure, where each box (except for the root) represents a part:&lt;br /&gt;
&lt;br /&gt;
[[File:OOXML_OPC_Example.svg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The XML file containing the relationships for a given part is located in &amp;lt;tt&amp;gt;_rels/(filename).rels&amp;lt;/tt&amp;gt;, relative to the directory containing that file. For the root relationships, this is simply &amp;lt;tt&amp;gt;/_rels/.rels&amp;lt;/tt&amp;gt;. For another file, say &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, the path is &amp;lt;tt&amp;gt;/word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s have a look at the root relationships file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/core.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/app.xml&amp;quot;/&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument&amp;quot;&lt;br /&gt;
    Target=&amp;quot;word/document.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/thumbnail.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the file, each relationship has an &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039;, a &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039;, and a &amp;#039;&amp;#039;&amp;#039;target&amp;#039;&amp;#039;&amp;#039;. The target is simply the filename of the part; this is relative to the location of the source of the relationship (in this case, the root directory). The type indicates what the format or purpose of that part is. The id serves as a unique identifier to distinguish one relationship from another.&lt;br /&gt;
&lt;br /&gt;
In some cases, you need to look up a relationship based on it&amp;#039;s type. For example, to determine the name of the file containing the content of a word document, you would need to look through the relationships file to find one that has the appropriate namespace. In other cases, you would use the id. For example, where an image is included in a document, it is referenced by its relationship id (in the document part&amp;#039;s relationships, not the root), and that id can then be used to find the path of the image.&lt;br /&gt;
&lt;br /&gt;
== Part relationships ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s now have a look at the relationships file for the document content part. We know from above that in this particular package the filename happens to be &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, so we can infer that its relationships must be stored in &amp;lt;tt&amp;gt;word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Note that if a given part does not have any outgoing relationships, it does not need to have a relationships file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;settings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;webSettings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable&amp;quot;&lt;br /&gt;
    Target=&amp;quot;fontTable.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId6&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme&amp;quot;&lt;br /&gt;
    Target=&amp;quot;theme/theme1.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles&amp;quot;&lt;br /&gt;
    Target=&amp;quot;styles.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects&amp;quot;&lt;br /&gt;
    Target=&amp;quot;stylesWithEffects.xml&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file is very similar to the root relationships file; the main difference is that it has a different set of relationships. The most important thing to note here is that all &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; values are relative to the directory containing the source part&amp;#039;s file. In this case, the file is &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, so the styles part is located at &amp;lt;tt&amp;gt;/word/styles.xml&amp;lt;/tt&amp;gt;, and the theme part is located at &amp;lt;tt&amp;gt;/word/theme/theme1.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Just as when determining the filename of the document content part, you must always look at the relationships file to determine the location of other related parts, such as the styles. Although MS Word seems to always use these particular paths, it&amp;#039;s not guaranteed by the specification, and in theory there could be some other application which uses a completely different set of physical path names instead. As long as you look up relationships based on the required type, you&amp;#039;ll always find the correct physical path.&lt;br /&gt;
&lt;br /&gt;
== External relationships ==&lt;br /&gt;
&lt;br /&gt;
So far, all of the relationships we&amp;#039;ve seen are to other files in the same package. However, it is also possible to have &amp;#039;&amp;#039;external&amp;#039;&amp;#039; relationships, for example when hyperlinks are included in a document. [[WordProcessingML]] does not directly include URLs for hyperlinks, but instead stores a relationship for the link, which the content document refers to by its relationship id.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an excerpt of a WordProcessingML file containing a hyperlink to http://www.openoffice.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:p&amp;gt;&lt;br /&gt;
  &amp;lt;w:hyperlink r:id=&amp;quot;rId5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:r&amp;gt;&lt;br /&gt;
      &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:rStyle w:val=&amp;quot;Hyperlink&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:t&amp;gt;Open Office&amp;lt;/w:t&amp;gt;&lt;br /&gt;
    &amp;lt;/w:r&amp;gt;&lt;br /&gt;
  &amp;lt;/w:hyperlink&amp;gt;&lt;br /&gt;
&amp;lt;/w:p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, we can see that the hyperlink refers to relationship id &amp;quot;rId5&amp;quot;. If we look in the relationships file for the content part, we&amp;#039;ll see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationship&lt;br /&gt;
  Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
  Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink&amp;quot;&lt;br /&gt;
  Target=&amp;quot;http://www.openoffice.org&amp;quot;&lt;br /&gt;
  TargetMode=&amp;quot;External&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute here, which was not set in any relationships shown earlier. Every relationship has a target mode; the default value is &amp;lt;tt&amp;gt;Internal&amp;lt;/tt&amp;gt;. Here, it is explicitly set to &amp;lt;tt&amp;gt;External&amp;lt;/tt&amp;gt;, so that we know it&amp;#039;s not referring to another file in the package.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt; of this relationship might initially seem sufficient to determine that the link is external, and this would be true if you had a list of all types that were meant to refer to external resources. However, it is possible that a piece of code that deals with OPC packages (such as a validation algorithm) may not have this information, and without knowing the target mode, might look for a file named &amp;lt;tt&amp;gt;http://www.openoffice.org&amp;lt;/tt&amp;gt;, not find it, and report an error. Thus the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute allows for arbitrary types (including any added to future versions of the spec, or proprietary extensions) to be used for relationships, while still allowing a program examining the package to check that all internal references are valid.&lt;br /&gt;
&lt;br /&gt;
== Implementation considerations ==&lt;br /&gt;
&lt;br /&gt;
When working with an OPC package, it&amp;#039;s best to think at the level of abstraction of the OPC spec, rather than simply as a zip archive containing files and directories. Treating the relationship graph as the primary data structure, and the zip-based storage mechanism an implementation detail can help to ensure that the validity requirements of the former are met.&lt;br /&gt;
&lt;br /&gt;
You should never assume that particular files will be stored at particular path names. An example of such a mistake would be to try and load &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt; when opening a &amp;lt;tt&amp;gt;.docx&amp;lt;/tt&amp;gt; file. It will work most of the time, and probably all of the time if you&amp;#039;re only dealing with currently-existing versions of MS Word, but the spec makes no guarantees that particular filenames will be used.&lt;br /&gt;
&lt;br /&gt;
When adding or removing parts (that is, files) from the package, you should ensure that the relationships are updated to match the changes. When adding a new part, you should add a corresponding outward relationship to the source document to ensure that it is connected, thus preventing the part from being an &amp;quot;orphan&amp;quot;. Similarly, when deleting a part, you should ensure that all relationships that point to that part are also removed. Keep in mind that there can be multiple relationships pointing to a particular part, as it&amp;#039;s a graph structure rather than a tree. As with memory structures, cycles are theoretically possible, but with OOXML not likely to occur in practice; if you do encounter a case where this can happen, a garbage collection algorithm may be necessary.&lt;br /&gt;
&lt;br /&gt;
Although an OPC package may be technically &amp;quot;invalid&amp;quot; if there are references for which targets do not exist, it&amp;#039;s a good idea to try a best-effort approach and continue processing as much as possible, ignoring the missing part. This allows your program to open documents even if they have been saved incorrectly by another program (or your own!) by not following the rules above. It may be useful to display a warning to the user and/or try to repair the structure.&lt;br /&gt;
&lt;br /&gt;
In some cases it&amp;#039;s possible to repair the relationship graph if some references are broken. For parts that are only supposed to appear at most once in a given package (such as the styles part for a Word document), you could scan through all the XML files in the package, and checking the root element to see if it has the relevant namespace URI and local name.&lt;br /&gt;
&lt;br /&gt;
For example, if you were to delete &amp;lt;tt&amp;gt;/rels/.rels&amp;lt;/tt&amp;gt; from the package in the earlier example, then the core properties, app properties, and document relationships could be derived by scanning the XML files. Strictly speaking, there would be no reliable way to derive the thumbnail property, as this could refer to any image in the package (and there may be many), though a heuristic based on the knowledge that Word at least sometimes saves it as &amp;lt;tt&amp;gt;docProps/thumbnail.jpeg&amp;lt;/tt&amp;gt; could be used. Other applications may not necessarily use the same path name however.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235473</id>
		<title>OOXML/Open Packaging Conventions (OPC)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235473"/>
		<updated>2014-07-23T19:46:57Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Removed some accidentally-duplicated text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Like ODF, OOXML documents are &amp;#039;&amp;#039;containers&amp;#039;&amp;#039;, stored physically as zip archives. Most of the files in the archive are in XML format, though binary files may be included in specific cases (e.g. for images).&lt;br /&gt;
&lt;br /&gt;
Each OOXML document has certain files that serve a particular role, such as the document content, stylesheet, metadata, and so forth. However, instead of simply using fixed path names within the archive (as ODF does), a part of the OOXML specification called &amp;#039;&amp;#039;&amp;#039;Open Packaging Conventions (OPC)&amp;#039;&amp;#039;&amp;#039; defines an additional layer of abstraction on top of the zip directory, which must be consulted to determine the actual paths at which certain files can be found.&lt;br /&gt;
&lt;br /&gt;
== Root relationships ==&lt;br /&gt;
&lt;br /&gt;
Each file inside an OPC package is called a &amp;#039;&amp;#039;&amp;#039;part&amp;#039;&amp;#039;&amp;#039;, and these are arrange as a directed graph - similar, but theoretically more flexible than a traditional directory tree. The graph&amp;#039;s vertices are parts (files), and edges are relationships. The set of outward relationships for a given part is stored as XML, in a file whose name is derived from the filename of the part.&lt;br /&gt;
&lt;br /&gt;
To give a concrete example, let&amp;#039;s consider the case of an empty document created in Word 2011 for Mac. This document has the following package structure, where each box (except for the root) represents a part:&lt;br /&gt;
&lt;br /&gt;
[[File:OOXML_OPC_Example.svg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The XML file containing the relationships for a given part is located in &amp;lt;tt&amp;gt;_rels/(filename).rels&amp;lt;/tt&amp;gt;, relative to the directory containing that file. For the root relationships, this is simply &amp;lt;tt&amp;gt;/_rels/.rels&amp;lt;/tt&amp;gt;. For another file, say &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, the path is &amp;lt;tt&amp;gt;/word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s have a look at the root relationships file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/core.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/app.xml&amp;quot;/&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument&amp;quot;&lt;br /&gt;
    Target=&amp;quot;word/document.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/thumbnail.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the file, each relationship has an &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039;, a &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039;, and a &amp;#039;&amp;#039;&amp;#039;target&amp;#039;&amp;#039;&amp;#039;. The target is simply the filename of the part; this is relative to the location of the source of the relationship (in this case, the root directory). The type indicates what the format or purpose of that part is. The id serves as a unique identifier to distinguish one relationship from another.&lt;br /&gt;
&lt;br /&gt;
In some cases, you need to look up a relationship based on it&amp;#039;s type. For example, to determine the name of the file containing the content of a word document, you would need to look through the relationships file to find one that has the appropriate namespace. In other cases, you would use the id. For example, where an image is included in a document, it is referenced by its relationship id (in the document part&amp;#039;s relationships, not the root), and that id can then be used to find the path of the image.&lt;br /&gt;
&lt;br /&gt;
== Part relationships ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s now have a look at the relationships file for the document content part. We know from above that in this particular package the filename happens to be &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, so we can infer that its relationships must be stored in &amp;lt;tt&amp;gt;word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Note that if a given part does not have any outgoing relationships, it does not need to have a relationships file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;settings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;webSettings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable&amp;quot;&lt;br /&gt;
    Target=&amp;quot;fontTable.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId6&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme&amp;quot;&lt;br /&gt;
    Target=&amp;quot;theme/theme1.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles&amp;quot;&lt;br /&gt;
    Target=&amp;quot;styles.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects&amp;quot;&lt;br /&gt;
    Target=&amp;quot;stylesWithEffects.xml&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file is very similar to the root relationships file; the main difference is that it has a different set of relationships. The most important thing to note here is that all &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; values are relative to the directory containing the source part&amp;#039;s file. In this case, the file is &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, so the styles part is located at &amp;lt;tt&amp;gt;/word/styles.xml&amp;lt;/tt&amp;gt;, and the theme part is located at &amp;lt;tt&amp;gt;/word/theme/theme1.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Just as when determining the filename of the document content part, you must always look at the relationships file to determine the location of other related parts, such as the styles. Although MS Word seems to always use these particular paths, it&amp;#039;s not guaranteed by the specification, and in theory there could be some other application which uses a completely different set of physical path names instead. As long as you look up relationships based on the required type, you&amp;#039;ll always find the correct physical path.&lt;br /&gt;
&lt;br /&gt;
== External relationships ==&lt;br /&gt;
&lt;br /&gt;
So far, all of the relationships we&amp;#039;ve seen are to other files in the same package. However, it is also possible to have &amp;#039;&amp;#039;external&amp;#039;&amp;#039; relationships, for example when hyperlinks are included in a document. [[WordProcessingML]] does not directly include URLs for hyperlinks, but instead stores a relationship for the link, which the content document refers to by its relationship id.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an excerpt of a WordProcessingML file containing a hyperlink to http://www.openoffice.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:p&amp;gt;&lt;br /&gt;
  &amp;lt;w:hyperlink r:id=&amp;quot;rId5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:r&amp;gt;&lt;br /&gt;
      &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:rStyle w:val=&amp;quot;Hyperlink&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:t&amp;gt;Open Office&amp;lt;/w:t&amp;gt;&lt;br /&gt;
    &amp;lt;/w:r&amp;gt;&lt;br /&gt;
  &amp;lt;/w:hyperlink&amp;gt;&lt;br /&gt;
&amp;lt;/w:p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, we can see that the hyperlink refers to relationship id &amp;quot;rId5&amp;quot;. If we look in the relationships file for the content part, we&amp;#039;ll see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationship&lt;br /&gt;
  Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
  Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink&amp;quot;&lt;br /&gt;
  Target=&amp;quot;http://www.openoffice.org&amp;quot;&lt;br /&gt;
  TargetMode=&amp;quot;External&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute here, which was not set in any relationships shown earlier. Every relationship has a target mode; the default value is &amp;lt;tt&amp;gt;Internal&amp;lt;/tt&amp;gt;. Here, it is explicitly set to &amp;lt;tt&amp;gt;External&amp;lt;/tt&amp;gt;, so that we know it&amp;#039;s not referring to another file in the package.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt; of this relationship might initially seem sufficient to determine that the link is external, and this would be true if you had a list of all types that were meant to refer to external resources. However, it is possible that a piece of code that deals with OPC packages (such as a validation algorithm) may not have this information, and without knowing the target mode, might look for a file named &amp;lt;tt&amp;gt;http://www.openoffice.org&amp;lt;/tt&amp;gt;, not find it, and report an error. Thus the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute allows for arbitrary types (including any added to future versions of the spec, or proprietary extensions) to be used for relationships, while still allowing a program examining the package to check that all internal references are valid.&lt;br /&gt;
&lt;br /&gt;
== Implementation considerations ==&lt;br /&gt;
&lt;br /&gt;
When working with an OPC package, it&amp;#039;s best to think at the level of abstraction of the OPC spec, rather than simply as a zip archive containing files and directories. Treating the relationship graph as the primary data structure, and the zip-based storage mechanism an implementation detail can help to ensure that the validity requirements of the former are met.&lt;br /&gt;
&lt;br /&gt;
You should never assume that particular files will be stored at particular path names. An example of such a mistake would be to try and load &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt; when opening a &amp;lt;tt&amp;gt;.docx&amp;lt;/tt&amp;gt; file. It will work most of the time, and probably all of the time if you&amp;#039;re only dealing with currently-existing versions of MS Word, but the spec makes no guarantees that particular filenames will be used.&lt;br /&gt;
&lt;br /&gt;
When adding or removing parts (that is, files) from the package, you should ensure that the relationships are updated to match the changes. When adding a new part, you should add a corresponding outward relationship to the source document to ensure that it is connected, thus preventing the part from being an &amp;quot;orphan&amp;quot;. Similarly, when deleting a part, you should ensure that all relationships that point to that part are also removed. Keep in mind that there can be multiple relationships pointing to a particular part, as it&amp;#039;s a graph structure rather than a tree. As with memory structures, cycles are theoretically possible, but with OOXML not likely to occur in practice; if you do encounter a case where this can happen, a garbage collection algorithm may be necessary.&lt;br /&gt;
&lt;br /&gt;
Although an OPC package may be technically &amp;quot;invalid&amp;quot; if there are references for which targets do not exist, it&amp;#039;s a good idea to try a best-effort approach and continue processing as much as possible, ignoring the missing part. This allows your program to open documents even if they have been saved incorrectly by another program (or your own!) by not following the rules above. It may be useful to display a warning to the user and/or try to repair the structure.&lt;br /&gt;
&lt;br /&gt;
In some cases it&amp;#039;s possible to repair the relationship graph if some references are broken. For parts that are only supposed to appear at most once in a given package (such as the styles part for a Word document), you could scan through all the XML files in the package, and checking the root element to see if it has the relevant namespace URI and local name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you were to delete &amp;lt;tt&amp;gt;/rels/.rels&amp;lt;/tt&amp;gt; from the package in the earlier example, then the core properties, app properties, and document relationships could be derived by scanning the XML files. Strictly speaking, there would be no reliable way to derive the thumbnail property, as this could refer to any image in the package (and there may be many), though a heuristic based on the knowledge that Word at least sometimes saves it as &amp;lt;tt&amp;gt;docProps/thumbnail.jpeg&amp;lt;/tt&amp;gt; could be used. Other applications may not necessarily use the same path name however.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235472</id>
		<title>OOXML/Open Packaging Conventions (OPC)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235472"/>
		<updated>2014-07-23T19:45:29Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Implementation considerations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Like ODF, OOXML documents are &amp;#039;&amp;#039;containers&amp;#039;&amp;#039;, stored physically as zip archives. Most of the files in the archive are in XML format, though binary files may be included in specific cases (e.g. for images).&lt;br /&gt;
&lt;br /&gt;
Each OOXML document has certain files that serve a particular role, such as the document content, stylesheet, metadata, and so forth. However, instead of simply using fixed path names within the archive (as ODF does), a part of the OOXML specification called &amp;#039;&amp;#039;&amp;#039;Open Packaging Conventions (OPC)&amp;#039;&amp;#039;&amp;#039; defines an additional layer of abstraction on top of the zip directory, which must be consulted to determine the actual paths at which certain files can be found.&lt;br /&gt;
&lt;br /&gt;
== Root relationships ==&lt;br /&gt;
&lt;br /&gt;
Each file inside an OPC package is called a &amp;#039;&amp;#039;&amp;#039;part&amp;#039;&amp;#039;&amp;#039;, and these are arrange as a directed graph - similar, but theoretically more flexible than a traditional directory tree. The graph&amp;#039;s vertices are parts (files), and edges are relationships. The set of outward relationships for a given part is stored as XML, in a file whose name is derived from the filename of the part.&lt;br /&gt;
&lt;br /&gt;
To give a concrete example, let&amp;#039;s consider the case of an empty document created in Word 2011 for Mac. This document has the following package structure, where each box (except for the root) represents a part:&lt;br /&gt;
&lt;br /&gt;
[[File:OOXML_OPC_Example.svg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The XML file containing the relationships for a given part is located in &amp;lt;tt&amp;gt;_rels/(filename).rels&amp;lt;/tt&amp;gt;, relative to the directory containing that file. For the root relationships, this is simply &amp;lt;tt&amp;gt;/_rels/.rels&amp;lt;/tt&amp;gt;. For another file, say &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, the path is &amp;lt;tt&amp;gt;/word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s have a look at the root relationships file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/core.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/app.xml&amp;quot;/&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument&amp;quot;&lt;br /&gt;
    Target=&amp;quot;word/document.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/thumbnail.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the file, each relationship has an &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039;, a &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039;, and a &amp;#039;&amp;#039;&amp;#039;target&amp;#039;&amp;#039;&amp;#039;. The target is simply the filename of the part; this is relative to the location of the source of the relationship (in this case, the root directory). The type indicates what the format or purpose of that part is. The id serves as a unique identifier to distinguish one relationship from another.&lt;br /&gt;
&lt;br /&gt;
In some cases, you need to look up a relationship based on it&amp;#039;s type. For example, to determine the name of the file containing the content of a word document, you would need to look through the relationships file to find one that has the appropriate namespace. In other cases, you would use the id. For example, where an image is included in a document, it is referenced by its relationship id (in the document part&amp;#039;s relationships, not the root), and that id can then be used to find the path of the image.&lt;br /&gt;
&lt;br /&gt;
== Part relationships ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s now have a look at the relationships file for the document content part. We know from above that in this particular package the filename happens to be &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, so we can infer that its relationships must be stored in &amp;lt;tt&amp;gt;word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Note that if a given part does not have any outgoing relationships, it does not need to have a relationships file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;settings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;webSettings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable&amp;quot;&lt;br /&gt;
    Target=&amp;quot;fontTable.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId6&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme&amp;quot;&lt;br /&gt;
    Target=&amp;quot;theme/theme1.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles&amp;quot;&lt;br /&gt;
    Target=&amp;quot;styles.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects&amp;quot;&lt;br /&gt;
    Target=&amp;quot;stylesWithEffects.xml&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file is very similar to the root relationships file; the main difference is that it has a different set of relationships. The most important thing to note here is that all &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; values are relative to the directory containing the source part&amp;#039;s file. In this case, the file is &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, so the styles part is located at &amp;lt;tt&amp;gt;/word/styles.xml&amp;lt;/tt&amp;gt;, and the theme part is located at &amp;lt;tt&amp;gt;/word/theme/theme1.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Just as when determining the filename of the document content part, you must always look at the relationships file to determine the location of other related parts, such as the styles. Although MS Word seems to always use these particular paths, it&amp;#039;s not guaranteed by the specification, and in theory there could be some other application which uses a completely different set of physical path names instead. As long as you look up relationships based on the required type, you&amp;#039;ll always find the correct physical path.&lt;br /&gt;
&lt;br /&gt;
== External relationships ==&lt;br /&gt;
&lt;br /&gt;
So far, all of the relationships we&amp;#039;ve seen are to other files in the same package. However, it is also possible to have &amp;#039;&amp;#039;external&amp;#039;&amp;#039; relationships, for example when hyperlinks are included in a document. [[WordProcessingML]] does not directly include URLs for hyperlinks, but instead stores a relationship for the link, which the content document refers to by its relationship id.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an excerpt of a WordProcessingML file containing a hyperlink to http://www.openoffice.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:p&amp;gt;&lt;br /&gt;
  &amp;lt;w:hyperlink r:id=&amp;quot;rId5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:r&amp;gt;&lt;br /&gt;
      &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:rStyle w:val=&amp;quot;Hyperlink&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:t&amp;gt;Open Office&amp;lt;/w:t&amp;gt;&lt;br /&gt;
    &amp;lt;/w:r&amp;gt;&lt;br /&gt;
  &amp;lt;/w:hyperlink&amp;gt;&lt;br /&gt;
&amp;lt;/w:p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, we can see that the hyperlink refers to relationship id &amp;quot;rId5&amp;quot;. If we look in the relationships file for the content part, we&amp;#039;ll see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationship&lt;br /&gt;
  Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
  Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink&amp;quot;&lt;br /&gt;
  Target=&amp;quot;http://www.openoffice.org&amp;quot;&lt;br /&gt;
  TargetMode=&amp;quot;External&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute here, which was not set in any relationships shown earlier. Every relationship has a target mode; the default value is &amp;lt;tt&amp;gt;Internal&amp;lt;/tt&amp;gt;. Here, it is explicitly set to &amp;lt;tt&amp;gt;External&amp;lt;/tt&amp;gt;, so that we know it&amp;#039;s not referring to another file in the package.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt; of this relationship might initially seem sufficient to determine that the link is external, and this would be true if you had a list of all types that were meant to refer to external resources. However, it is possible that a piece of code that deals with OPC packages (such as a validation algorithm) may not have this information, and without knowing the target mode, might look for a file named &amp;lt;tt&amp;gt;http://www.openoffice.org&amp;lt;/tt&amp;gt;, not find it, and report an error. Thus the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute allows for arbitrary types (including any added to future versions of the spec, or proprietary extensions) to be used for relationships, while still allowing a program examining the package to check that all internal references are valid.&lt;br /&gt;
&lt;br /&gt;
== Implementation considerations ==&lt;br /&gt;
&lt;br /&gt;
When working with an OPC package, it&amp;#039;s best to think at the level of abstraction of the OPC spec, rather than simply as a zip archive containing files and directories. Treating the relationship graph as the primary data structure, and the zip-based storage mechanism an implementation detail can help to ensure that the validity requirements of the former are met.&lt;br /&gt;
&lt;br /&gt;
You should never assume that particular files will be stored at particular path names. An example of such a mistake would be to try and load &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt; when opening a &amp;lt;tt&amp;gt;.docx&amp;lt;/tt&amp;gt; file. It will work most of the time, and probably all of the time if you&amp;#039;re only dealing with currently-existing versions of MS Word, but the spec makes no guarantees that particular filenames will be used.&lt;br /&gt;
&lt;br /&gt;
When adding or removing parts (that is, files) from the package, you should ensure that the relationships are updated to match the changes. When adding a new part, you should add a corresponding outward relationship to the source document to ensure that it is connected, thus preventing the part from being an &amp;quot;orphan&amp;quot;. Similarly, when deleting a part, you should ensure that all relationships that point to that part are also removed. Keep in mind that there can be multiple relationships pointing to a particular part, as it&amp;#039;s a graph structure rather than a tree. As with memory structures, cycles are theoretically possible, but with OOXML not likely to occur in practice; if you do encounter a case where this can happen, a garbage collection algorithm may be necessary.&lt;br /&gt;
&lt;br /&gt;
Although an OPC package may be technically &amp;quot;invalid&amp;quot; if there are references for which targets do not exist, it&amp;#039;s a good idea to try a best-effort approach and continue processing as much as possible, ignoring the missing part. This allows your program to open documents even if they have been saved incorrectly by another program (or your own!) by not following the rules above. It may be useful to display a warning to the user and/or try to repair the structure.&lt;br /&gt;
&lt;br /&gt;
In some cases it&amp;#039;s possible to repair the relationship graph if some references are broken. For parts that are only supposed to appear at most once in a given package (such as the styles part for a Word document), you could scan through all the XML files in the package, and checking the root element to see if it has the relevant namespace URI and local name. For example, you could delete &amp;lt;tt&amp;gt;/_rels/.rels&amp;lt;/tt&amp;gt; in the earlier example, and then reconstruct it, simply based on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, if you were to delete &amp;lt;tt&amp;gt;/rels/.rels&amp;lt;/tt&amp;gt; from the package in the earlier example, then the core properties, app properties, and document relationships could be derived by scanning the XML files. Strictly speaking, there would be no reliable way to derive the thumbnail property, as this could refer to any image in the package (and there may be many), though a heuristic based on the knowledge that Word at least sometimes saves it as &amp;lt;tt&amp;gt;docProps/thumbnail.jpeg&amp;lt;/tt&amp;gt; could be used. Other applications may not necessarily use the same path name however.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235471</id>
		<title>OOXML/Open Packaging Conventions (OPC)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235471"/>
		<updated>2014-07-23T18:32:16Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Spelling/grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Like ODF, OOXML documents are &amp;#039;&amp;#039;containers&amp;#039;&amp;#039;, stored physically as zip archives. Most of the files in the archive are in XML format, though binary files may be included in specific cases (e.g. for images).&lt;br /&gt;
&lt;br /&gt;
Each OOXML document has certain files that serve a particular role, such as the document content, stylesheet, metadata, and so forth. However, instead of simply using fixed path names within the archive (as ODF does), a part of the OOXML specification called &amp;#039;&amp;#039;&amp;#039;Open Packaging Conventions (OPC)&amp;#039;&amp;#039;&amp;#039; defines an additional layer of abstraction on top of the zip directory, which must be consulted to determine the actual paths at which certain files can be found.&lt;br /&gt;
&lt;br /&gt;
== Root relationships ==&lt;br /&gt;
&lt;br /&gt;
Each file inside an OPC package is called a &amp;#039;&amp;#039;&amp;#039;part&amp;#039;&amp;#039;&amp;#039;, and these are arrange as a directed graph - similar, but theoretically more flexible than a traditional directory tree. The graph&amp;#039;s vertices are parts (files), and edges are relationships. The set of outward relationships for a given part is stored as XML, in a file whose name is derived from the filename of the part.&lt;br /&gt;
&lt;br /&gt;
To give a concrete example, let&amp;#039;s consider the case of an empty document created in Word 2011 for Mac. This document has the following package structure, where each box (except for the root) represents a part:&lt;br /&gt;
&lt;br /&gt;
[[File:OOXML_OPC_Example.svg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The XML file containing the relationships for a given part is located in &amp;lt;tt&amp;gt;_rels/(filename).rels&amp;lt;/tt&amp;gt;, relative to the directory containing that file. For the root relationships, this is simply &amp;lt;tt&amp;gt;/_rels/.rels&amp;lt;/tt&amp;gt;. For another file, say &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, the path is &amp;lt;tt&amp;gt;/word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s have a look at the root relationships file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/core.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/app.xml&amp;quot;/&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument&amp;quot;&lt;br /&gt;
    Target=&amp;quot;word/document.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/thumbnail.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the file, each relationship has an &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039;, a &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039;, and a &amp;#039;&amp;#039;&amp;#039;target&amp;#039;&amp;#039;&amp;#039;. The target is simply the filename of the part; this is relative to the location of the source of the relationship (in this case, the root directory). The type indicates what the format or purpose of that part is. The id serves as a unique identifier to distinguish one relationship from another.&lt;br /&gt;
&lt;br /&gt;
In some cases, you need to look up a relationship based on it&amp;#039;s type. For example, to determine the name of the file containing the content of a word document, you would need to look through the relationships file to find one that has the appropriate namespace. In other cases, you would use the id. For example, where an image is included in a document, it is referenced by its relationship id (in the document part&amp;#039;s relationships, not the root), and that id can then be used to find the path of the image.&lt;br /&gt;
&lt;br /&gt;
== Part relationships ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s now have a look at the relationships file for the document content part. We know from above that in this particular package the filename happens to be &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, so we can infer that its relationships must be stored in &amp;lt;tt&amp;gt;word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Note that if a given part does not have any outgoing relationships, it does not need to have a relationships file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;settings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;webSettings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable&amp;quot;&lt;br /&gt;
    Target=&amp;quot;fontTable.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId6&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme&amp;quot;&lt;br /&gt;
    Target=&amp;quot;theme/theme1.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles&amp;quot;&lt;br /&gt;
    Target=&amp;quot;styles.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects&amp;quot;&lt;br /&gt;
    Target=&amp;quot;stylesWithEffects.xml&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file is very similar to the root relationships file; the main difference is that it has a different set of relationships. The most important thing to note here is that all &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; values are relative to the directory containing the source part&amp;#039;s file. In this case, the file is &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, so the styles part is located at &amp;lt;tt&amp;gt;/word/styles.xml&amp;lt;/tt&amp;gt;, and the theme part is located at &amp;lt;tt&amp;gt;/word/theme/theme1.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Just as when determining the filename of the document content part, you must always look at the relationships file to determine the location of other related parts, such as the styles. Although MS Word seems to always use these particular paths, it&amp;#039;s not guaranteed by the specification, and in theory there could be some other application which uses a completely different set of physical path names instead. As long as you look up relationships based on the required type, you&amp;#039;ll always find the correct physical path.&lt;br /&gt;
&lt;br /&gt;
== External relationships ==&lt;br /&gt;
&lt;br /&gt;
So far, all of the relationships we&amp;#039;ve seen are to other files in the same package. However, it is also possible to have &amp;#039;&amp;#039;external&amp;#039;&amp;#039; relationships, for example when hyperlinks are included in a document. [[WordProcessingML]] does not directly include URLs for hyperlinks, but instead stores a relationship for the link, which the content document refers to by its relationship id.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an excerpt of a WordProcessingML file containing a hyperlink to http://www.openoffice.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:p&amp;gt;&lt;br /&gt;
  &amp;lt;w:hyperlink r:id=&amp;quot;rId5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:r&amp;gt;&lt;br /&gt;
      &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:rStyle w:val=&amp;quot;Hyperlink&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:t&amp;gt;Open Office&amp;lt;/w:t&amp;gt;&lt;br /&gt;
    &amp;lt;/w:r&amp;gt;&lt;br /&gt;
  &amp;lt;/w:hyperlink&amp;gt;&lt;br /&gt;
&amp;lt;/w:p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, we can see that the hyperlink refers to relationship id &amp;quot;rId5&amp;quot;. If we look in the relationships file for the content part, we&amp;#039;ll see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationship&lt;br /&gt;
  Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
  Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink&amp;quot;&lt;br /&gt;
  Target=&amp;quot;http://www.openoffice.org&amp;quot;&lt;br /&gt;
  TargetMode=&amp;quot;External&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute here, which was not set in any relationships shown earlier. Every relationship has a target mode; the default value is &amp;lt;tt&amp;gt;Internal&amp;lt;/tt&amp;gt;. Here, it is explicitly set to &amp;lt;tt&amp;gt;External&amp;lt;/tt&amp;gt;, so that we know it&amp;#039;s not referring to another file in the package.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Type&amp;lt;/tt&amp;gt; of this relationship might initially seem sufficient to determine that the link is external, and this would be true if you had a list of all types that were meant to refer to external resources. However, it is possible that a piece of code that deals with OPC packages (such as a validation algorithm) may not have this information, and without knowing the target mode, might look for a file named &amp;lt;tt&amp;gt;http://www.openoffice.org&amp;lt;/tt&amp;gt;, not find it, and report an error. Thus the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute allows for arbitrary types (including any added to future versions of the spec, or proprietary extensions) to be used for relationships, while still allowing a program examining the package to check that all internal references are valid.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235470</id>
		<title>OOXML/Open Packaging Conventions (OPC)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235470"/>
		<updated>2014-07-23T18:18:03Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Add diagram&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Like ODF, OOXML documents are &amp;#039;&amp;#039;containers&amp;#039;&amp;#039;, stored physically as zip archives. Most of the files in the archive are in XML format, though binary files may be included in specific cases (e.g. for images).&lt;br /&gt;
&lt;br /&gt;
Each OOXML document has certain files that serve a particular role, such as the document content, stylesheet, met data, and so forth. However, instead of simply using fixed path names within the archive (as ODF does), a part of the OOXML specification called Open Packaging Conventions (OPC) defines an additional layer of abstraction on top of the zip directory, which must be consulted to determine the actual paths at which certain files can be found.&lt;br /&gt;
&lt;br /&gt;
== Root relationships ==&lt;br /&gt;
&lt;br /&gt;
Each file inside an OPC package is called a &amp;quot;part&amp;quot;, and these are arrange as a directed graph - similar, but theoretically more flexible - than a traditional directory hierarchy. The graph&amp;#039;s vertices are parts (files), and edges relationships. The set of outward relationships for a given part is stored as XML, in a file whose name is derived from the filename of the part.&lt;br /&gt;
&lt;br /&gt;
To give a concrete example, let&amp;#039;s consider the case of an empty document created in Word 2011 for mac. This document has the following structure, where each box (except for the root) represents a part:&lt;br /&gt;
&lt;br /&gt;
[[File:OOXML_OPC_Example.svg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The XML file containing the relationships for a given part is located in &amp;lt;tt&amp;gt;_rels/(filename).rels&amp;lt;/tt&amp;gt;, relative to the directory containing that file. For the root relationships, this is simply &amp;lt;tt&amp;gt;/_rels/.rels&amp;lt;/tt&amp;gt;. For another file, say &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, the path is &amp;lt;tt&amp;gt;/word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Let&amp;#039;s have a look at the root relationships file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/core.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/app.xml&amp;quot;/&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument&amp;quot;&lt;br /&gt;
    Target=&amp;quot;word/document.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/thumbnail.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the file, each relationship has an id, a type, and a target. The target is simply the filename of the part; this is relative to the location of the source of the relationship (in this case, the root directory). The type indicates what the format or purpose of that part is. The id serves as a unique identifier to distinguish one relationship from another.&lt;br /&gt;
&lt;br /&gt;
In some cases, you need to look up a relationship based on it&amp;#039;s type; for example, to determine the name of the file containing the content of a word document, you would need to look through the relationships file to find one that has the appropriate namespace. In other cases, you would use the id; for example, where an image is included in a document, it is referenced by its relationship id (in the document part&amp;#039;s relationships, not the root), and that id can then be used to find the path of the image.&lt;br /&gt;
&lt;br /&gt;
== Part relationships ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s now have a look at the relationships file for the document content part. We know that in this particular case the filename happens to be &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, so we can infer that its relationships must be stored in &amp;lt;tt&amp;gt;word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Note that if a given part does not have any outgoing relationships, it does not need to have a relationships file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;settings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;webSettings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable&amp;quot;&lt;br /&gt;
    Target=&amp;quot;fontTable.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId6&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme&amp;quot;&lt;br /&gt;
    Target=&amp;quot;theme/theme1.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles&amp;quot;&lt;br /&gt;
    Target=&amp;quot;styles.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects&amp;quot;&lt;br /&gt;
    Target=&amp;quot;stylesWithEffects.xml&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file is very similar to the root relationships file; the main difference is that it has a different set of relationships. The most important thing to note here is that all &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; values are relative to the directory containing the source part&amp;#039;s file. In this case, the file is &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, so the styles part is located at &amp;lt;tt&amp;gt;/word/styles.xml&amp;lt;/tt&amp;gt;, and the theme part is located at &amp;lt;tt&amp;gt;/word/theme/theme1.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Just as when determining the filename of the document content part, you must always look at the relationships file to determine the location of other related parts, such as the styles part. Although Word saves in these locations, it&amp;#039;s not guaranteed by the format, and in theory it would be possible for some other application to use a completely different set of physical path names. As long as you look up relations based on the required type, you&amp;#039;ll always find the correct physical path.&lt;br /&gt;
&lt;br /&gt;
== External relationships ==&lt;br /&gt;
&lt;br /&gt;
So far, all of the relationships we&amp;#039;ve seen are to other files in the same package. However, it is also possible to have &amp;#039;&amp;#039;external&amp;#039;&amp;#039; references, for example when hyperlinks are included in a document. [[WordProcessingML]] does not directly include URLs for hyperlinks, but instead stores a relationship for the link, which the content document refers to by its relationship id.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an excerpt of a WordProcessingML file containing a hyperlink to http://www.openoffice.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:p&amp;gt;&lt;br /&gt;
  &amp;lt;w:hyperlink r:id=&amp;quot;rId5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:r&amp;gt;&lt;br /&gt;
      &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:rStyle w:val=&amp;quot;Hyperlink&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:t&amp;gt;Open Office&amp;lt;/w:t&amp;gt;&lt;br /&gt;
    &amp;lt;/w:r&amp;gt;&lt;br /&gt;
  &amp;lt;/w:hyperlink&amp;gt;&lt;br /&gt;
&amp;lt;/w:p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, we can see that the hyperlink refers to relationship id &amp;quot;rId5&amp;quot;. If we look in the relationships file for the content part, we&amp;#039;ll see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationship&lt;br /&gt;
  Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
  Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink&amp;quot;&lt;br /&gt;
  Target=&amp;quot;http://www.openoffice.org&amp;quot;&lt;br /&gt;
  TargetMode=&amp;quot;External&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute here, which was not set in any relationships shown earlier. Every relationship has a target mode; the default value is &amp;lt;tt&amp;gt;Internal&amp;lt;/tt&amp;gt;. Here, it is explicitly set to &amp;lt;tt&amp;gt;External&amp;lt;/tt&amp;gt;, so that we know it&amp;#039;s not referring to another file in the package.&lt;br /&gt;
&lt;br /&gt;
The type of this relationship might initially seem sufficient to determine that the link is external, and this would be true if you had a list of all types that were meant to refer to external resources. However, it is possible that a piece of code that deals with OPC packages (such as a validation algorithm) may not have this information, and without knowing the target mode, might look for a file named &amp;lt;tt&amp;gt;http://www.openoffice.org&amp;lt;/tt&amp;gt;, not find it, and report an error. Thus the TargetMode allows for arbitrary types (including any added in the future, or proprietary extensions) to be used for relationships, while still allowing a program examining the package to check that all internal references are valid.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=File:OOXML_OPC_Example.svg&amp;diff=235469</id>
		<title>File:OOXML OPC Example.svg</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=File:OOXML_OPC_Example.svg&amp;diff=235469"/>
		<updated>2014-07-23T18:15:45Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: PeterKelly uploaded a new version of &amp;amp;quot;File:OOXML OPC Example.svg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=File:OOXML_OPC_Example.svg&amp;diff=235468</id>
		<title>File:OOXML OPC Example.svg</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=File:OOXML_OPC_Example.svg&amp;diff=235468"/>
		<updated>2014-07-23T18:12:38Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235467</id>
		<title>OOXML/Open Packaging Conventions (OPC)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Open_Packaging_Conventions_(OPC)&amp;diff=235467"/>
		<updated>2014-07-23T18:09:28Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Like ODF, OOXML documents are &amp;#039;&amp;#039;containers&amp;#039;&amp;#039;, stored physically as zip archives. Most of the files in the archive are in XML format, though binary files may be included in specific cases (e.g. for images).&lt;br /&gt;
&lt;br /&gt;
Each OOXML document has certain files that serve a particular role, such as the document content, stylesheet, met data, and so forth. However, instead of simply using fixed path names within the archive (as ODF does), a part of the OOXML specification called Open Packaging Conventions (OPC) defines an additional layer of abstraction on top of the zip directory, which must be consulted to determine the actual paths at which certain files can be found.&lt;br /&gt;
&lt;br /&gt;
== Root relationships ==&lt;br /&gt;
&lt;br /&gt;
Each file inside an OPC package is called a &amp;quot;part&amp;quot;, and these are arrange as a directed graph - similar, but theoretically more flexible - than a traditional directory hierarchy. The graph&amp;#039;s vertices are parts (files), and edges relationships. The set of outward relationships for a given part is stored as XML, in a file whose name is derived from the filename of the part.&lt;br /&gt;
&lt;br /&gt;
To give a concrete example, let&amp;#039;s consider the case of an empty document created in Word 2011 for mac. This document has the following structure, where each box (except for the root) represents a part:&lt;br /&gt;
&lt;br /&gt;
(diagram)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The XML file containing the relationships for a given part is located in &amp;lt;tt&amp;gt;_rels/(filename).rels&amp;lt;/tt&amp;gt;, relative to the directory containing that file. For the root relationships, this is simply &amp;lt;tt&amp;gt;/_rels/.rels&amp;lt;/tt&amp;gt;. For another file, say &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, the path is &amp;lt;tt&amp;gt;/word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Let&amp;#039;s have a look at the root relationships file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/core.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/app.xml&amp;quot;/&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument&amp;quot;&lt;br /&gt;
    Target=&amp;quot;word/document.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail&amp;quot;&lt;br /&gt;
    Target=&amp;quot;docProps/thumbnail.jpeg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see from the file, each relationship has an id, a type, and a target. The target is simply the filename of the part; this is relative to the location of the source of the relationship (in this case, the root directory). The type indicates what the format or purpose of that part is. The id serves as a unique identifier to distinguish one relationship from another.&lt;br /&gt;
&lt;br /&gt;
In some cases, you need to look up a relationship based on it&amp;#039;s type; for example, to determine the name of the file containing the content of a word document, you would need to look through the relationships file to find one that has the appropriate namespace. In other cases, you would use the id; for example, where an image is included in a document, it is referenced by its relationship id (in the document part&amp;#039;s relationships, not the root), and that id can then be used to find the path of the image.&lt;br /&gt;
&lt;br /&gt;
== Part relationships ==&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s now have a look at the relationships file for the document content part. We know that in this particular case the filename happens to be &amp;lt;tt&amp;gt;word/document.xml&amp;lt;/tt&amp;gt;, so we can infer that its relationships must be stored in &amp;lt;tt&amp;gt;word/_rels/document.xml.rels&amp;lt;/tt&amp;gt;. Note that if a given part does not have any outgoing relationships, it does not need to have a relationships file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationships xmlns=&amp;quot;http://schemas.openxmlformats.org/package/2006/relationships&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId3&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;settings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId4&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings&amp;quot;&lt;br /&gt;
    Target=&amp;quot;webSettings.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable&amp;quot;&lt;br /&gt;
    Target=&amp;quot;fontTable.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId6&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme&amp;quot;&lt;br /&gt;
    Target=&amp;quot;theme/theme1.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId1&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles&amp;quot;&lt;br /&gt;
    Target=&amp;quot;styles.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Relationship&lt;br /&gt;
    Id=&amp;quot;rId2&amp;quot;&lt;br /&gt;
    Type=&amp;quot;http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects&amp;quot;&lt;br /&gt;
    Target=&amp;quot;stylesWithEffects.xml&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/Relationships&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file is very similar to the root relationships file; the main difference is that it has a different set of relationships. The most important thing to note here is that all &amp;lt;tt&amp;gt;Target&amp;lt;/tt&amp;gt; values are relative to the directory containing the source part&amp;#039;s file. In this case, the file is &amp;lt;tt&amp;gt;/word/document.xml&amp;lt;/tt&amp;gt;, so the styles part is located at &amp;lt;tt&amp;gt;/word/styles.xml&amp;lt;/tt&amp;gt;, and the theme part is located at &amp;lt;tt&amp;gt;/word/theme/theme1.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Just as when determining the filename of the document content part, you must always look at the relationships file to determine the location of other related parts, such as the styles part. Although Word saves in these locations, it&amp;#039;s not guaranteed by the format, and in theory it would be possible for some other application to use a completely different set of physical path names. As long as you look up relations based on the required type, you&amp;#039;ll always find the correct physical path.&lt;br /&gt;
&lt;br /&gt;
== External relationships ==&lt;br /&gt;
&lt;br /&gt;
So far, all of the relationships we&amp;#039;ve seen are to other files in the same package. However, it is also possible to have &amp;#039;&amp;#039;external&amp;#039;&amp;#039; references, for example when hyperlinks are included in a document. [[WordProcessingML]] does not directly include URLs for hyperlinks, but instead stores a relationship for the link, which the content document refers to by its relationship id.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an excerpt of a WordProcessingML file containing a hyperlink to http://www.openoffice.org&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:p&amp;gt;&lt;br /&gt;
  &amp;lt;w:hyperlink r:id=&amp;quot;rId5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:r&amp;gt;&lt;br /&gt;
      &amp;lt;w:rPr&amp;gt;&lt;br /&gt;
        &amp;lt;w:rStyle w:val=&amp;quot;Hyperlink&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/w:rPr&amp;gt;&lt;br /&gt;
      &amp;lt;w:t&amp;gt;Open Office&amp;lt;/w:t&amp;gt;&lt;br /&gt;
    &amp;lt;/w:r&amp;gt;&lt;br /&gt;
  &amp;lt;/w:hyperlink&amp;gt;&lt;br /&gt;
&amp;lt;/w:p&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, we can see that the hyperlink refers to relationship id &amp;quot;rId5&amp;quot;. If we look in the relationships file for the content part, we&amp;#039;ll see the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Relationship&lt;br /&gt;
  Id=&amp;quot;rId5&amp;quot;&lt;br /&gt;
  Type=&amp;quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink&amp;quot;&lt;br /&gt;
  Target=&amp;quot;http://www.openoffice.org&amp;quot;&lt;br /&gt;
  TargetMode=&amp;quot;External&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &amp;lt;tt&amp;gt;TargetMode&amp;lt;/tt&amp;gt; attribute here, which was not set in any relationships shown earlier. Every relationship has a target mode; the default value is &amp;lt;tt&amp;gt;Internal&amp;lt;/tt&amp;gt;. Here, it is explicitly set to &amp;lt;tt&amp;gt;External&amp;lt;/tt&amp;gt;, so that we know it&amp;#039;s not referring to another file in the package.&lt;br /&gt;
&lt;br /&gt;
The type of this relationship might initially seem sufficient to determine that the link is external, and this would be true if you had a list of all types that were meant to refer to external resources. However, it is possible that a piece of code that deals with OPC packages (such as a validation algorithm) may not have this information, and without knowing the target mode, might look for a file named &amp;lt;tt&amp;gt;http://www.openoffice.org&amp;lt;/tt&amp;gt;, not find it, and report an error. Thus the TargetMode allows for arbitrary types (including any added in the future, or proprietary extensions) to be used for relationships, while still allowing a program examining the package to check that all internal references are valid.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=User:PeterKelly&amp;diff=235442</id>
		<title>User:PeterKelly</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=User:PeterKelly&amp;diff=235442"/>
		<updated>2014-07-20T14:03:11Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am the developer of UX Write, a word processor for the iPad:&lt;br /&gt;
&lt;br /&gt;
* http://www.uxproductivity.com&lt;br /&gt;
* http://blog.uxproductivity.com&lt;br /&gt;
&lt;br /&gt;
You can contact me at [mailto:peter@uxproductivity.com peter@uxproductivity.com].&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Markup_Compatibility_and_Extensibility&amp;diff=235441</id>
		<title>OOXML/Markup Compatibility and Extensibility</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Markup_Compatibility_and_Extensibility&amp;diff=235441"/>
		<updated>2014-07-20T13:58:42Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Cleanups&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although the OOXML spec defines a specific set of allowed elements, Microsoft sometimes extend this with additional proprietary elements that are specific to new versions of Office. For example, if you insert a shape into a document in Word 2013, it will be defined in terms of a &amp;quot;word processing shape&amp;quot; element structure, which is not part of the OOXML spec. For the purposes of compatibility with older versions of Word however, they include a second version of the shape which uses an element structure that &amp;#039;&amp;#039;is&amp;#039;&amp;#039; defined in the spec, albeit using the legacy VML drawing format.&lt;br /&gt;
&lt;br /&gt;
Part 3 of the OOXML spec defines &amp;quot;Markup compatibility and extensibility&amp;quot;, which is the means by which a document can include multiple versions of the same piece of content in different formats. The XML is structured in such a way that applications which know how to work with elements in particular namespaces can use the more information-rich version of the content, while those which support only those elements defined in the standard can use an alternate version of the content. The XML structure is conceptually like a series of if-then statements with an else clause at the end.&lt;br /&gt;
&lt;br /&gt;
As an example, let&amp;#039;s consider a shape object in a &amp;lt;tt&amp;gt;.docx&amp;lt;/tt&amp;gt; file created in Word 2013. A the top of the file, we have the following namespace definitions:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:document&lt;br /&gt;
  xmlns:wps=&amp;quot;http://schemas.microsoft.com/office/word/2010/wordprocessingShape&amp;quot;&lt;br /&gt;
  xmlns:mc=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;br /&gt;
  xmlns:w=&amp;quot;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then in the body of the document, the shape is stored as follows&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mc:AlternateContent&amp;gt;&lt;br /&gt;
  &amp;lt;mc:Choice Requires=&amp;quot;wps&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:drawing&amp;gt; ... &amp;lt;/w:drawing&amp;gt;&lt;br /&gt;
  &amp;lt;/mc:Choice&amp;gt;&lt;br /&gt;
  &amp;lt;mc:Fallback&amp;gt;&lt;br /&gt;
    &amp;lt;w:pict&amp;gt; ... &amp;lt;/w:pict&amp;gt;&lt;br /&gt;
  &amp;lt;/mc:Fallback&amp;gt;&lt;br /&gt;
&amp;lt;/mc:AlternateContent&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The three markup compatibility elements used here are as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; - A container for a sequence of multiple representations of a given piece of content. The program reading the file should only process one of these, and the one chosen should be based on which conditions match.&lt;br /&gt;
* &amp;lt;code&amp;gt;Choice&amp;lt;/code&amp;gt; - Essentially an if statement. This specifies a &amp;lt;code&amp;gt;Requires&amp;lt;/code&amp;gt; element, which indicates the namespaces that the reader must support in order to successfully process all of the descendant elements. Note that some of these may be those defined in the spec, and some may be proprietary - it just means that in order to &amp;#039;&amp;#039;fully&amp;#039;&amp;#039; understand everything, the specified namespaces must be supported. Note also that these namespaces are referenced by prefix, not URI.&lt;br /&gt;
* &amp;lt;code&amp;gt;Fallback&amp;lt;/code&amp;gt; - This is what the reader should look at if none of the preceding &amp;lt;code&amp;gt;Choice&amp;lt;/code&amp;gt; elements match. This section is only supposed to contain elements that are part of the standard.&lt;br /&gt;
Since &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; elements can potentially occur anywhere in a file, a simple way to deal with them is to simply strip out all unsupported subtrees during or immediately after parsing. Assuming you know the set of namespaces whose elements you support, you can go through the file and strip out all but one of the children of the &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; element, as well as the &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; element itself. In the above example, assuming a reader that doesn&amp;#039;t support the &amp;lt;tt&amp;gt;wordprocessingShape&amp;lt;/tt&amp;gt; namespace, this would result in just a &amp;lt;tt&amp;gt;&amp;lt;w:pict&amp;gt;&amp;lt;/tt&amp;gt; element.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=OOXML/Markup_Compatibility_and_Extensibility&amp;diff=235440</id>
		<title>OOXML/Markup Compatibility and Extensibility</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=OOXML/Markup_Compatibility_and_Extensibility&amp;diff=235440"/>
		<updated>2014-07-20T13:55:49Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: Initial version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although the [[OOXML]] spec defines a specific set of allowed elements, Microsoft sometimes extend this with additional proprietary elements that are specific to new versions of Office. For example, if you insert a shape into a document in Word 2013, it will be defined in terms of a &amp;quot;word processing shape&amp;quot; element structure, which is not part of the OOXML spec. For the purposes of compatibility with older versions of Word however, they include a second version of the shape which uses an element structure that &amp;#039;&amp;#039;is&amp;#039;&amp;#039; defined in the spec, albeit using the legacy VML drawing format.&lt;br /&gt;
&lt;br /&gt;
Part 3 of the OOXML spec defined &amp;quot;Markup compatibility and extensibility&amp;quot;, which is the means by which a document can include multiple versions of the same piece of content in different formats. The XML is structured in such a way that applications which know how to work with elements in particular namespaces can use the more information-rich version of the content, while those which support only those elements defined in the standard can use an alternate version of the content. The XML structure is conceptually like a series of if-then statements with an else clause at the end.&lt;br /&gt;
&lt;br /&gt;
As an example, let&amp;#039;s consider a shape object in a &amp;lt;tt&amp;gt;.docx&amp;lt;/tt&amp;gt; file created in Word 2013. A the top of the file, we have the following namespace definitions:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;w:document&lt;br /&gt;
  xmlns:wps=&amp;quot;http://schemas.microsoft.com/office/word/2010/wordprocessingShape&amp;quot;&lt;br /&gt;
  xmlns:mc=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;br /&gt;
  xmlns:w=&amp;quot;http://schemas.openxmlformats.org/wordprocessingml/2006/main&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in the body of the document, the shape is stored as follows&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mc:AlternateContent&amp;gt;&lt;br /&gt;
  &amp;lt;mc:Choice Requires=&amp;quot;wps&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;w:drawing&amp;gt; ... &amp;lt;/w:drawing&amp;gt;&lt;br /&gt;
  &amp;lt;/mc:Choice&amp;gt;&lt;br /&gt;
  &amp;lt;mc:Fallback&amp;gt;&lt;br /&gt;
    &amp;lt;w:pict&amp;gt; ... &amp;lt;/w:pict&amp;gt;&lt;br /&gt;
  &amp;lt;/mc:Fallback&amp;gt;&lt;br /&gt;
&amp;lt;/mc:AlternateContent&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The three markup compatibility elements used here are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; - A container for a sequence of multiple representations of a given piece of content. The program reading the file should only process one of these, and the one chosen should be based on which conditions match.&lt;br /&gt;
* &amp;lt;code&amp;gt;Choice&amp;lt;/code&amp;gt; - Essentially an if statement. This specifies a &amp;lt;code&amp;gt;Requires&amp;lt;/code&amp;gt; element, which indicates the namespaces that the reader must support in order to successfully process all of the descendant elements. Note that some of these may be those defined in the spec, and some may be proprietary - it just means that in order to &amp;#039;&amp;#039;fully&amp;#039;&amp;#039; understand everything, the specified namespaces must be supported. Note also that these namespaces are referenced by prefix, not URI.&lt;br /&gt;
* &amp;lt;code&amp;gt;Fallback&amp;lt;/code&amp;gt; - This is what the reader should look at if none of the preceding &amp;lt;code&amp;gt;Choice&amp;lt;/code&amp;gt; elements match. This section is only supposed to contain elements that are part of the standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; elements can potentially occur anywhere in a file, a simple way to deal with them is to simply strip out all unsupported subtrees during or immediately after parsing. Assuming you know the set of namespaces whose elements you support, you can go through the file and strip out all but one of the children of the &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; element, as well as the &amp;lt;code&amp;gt;AlternateContent&amp;lt;/code&amp;gt; element itself. In the above example, assuming a reader that doesn&amp;#039;t support the &amp;lt;tt&amp;gt;wordprocessingShape&amp;lt;/tt&amp;gt; namespace, this would result in just a &amp;lt;tt&amp;gt;&amp;lt;w:pict&amp;gt;&amp;lt;/tt&amp;gt; element.&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Office_Open_XML&amp;diff=235439</id>
		<title>Office Open XML</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Office_Open_XML&amp;diff=235439"/>
		<updated>2014-07-20T13:41:22Z</updated>

		<summary type="html">&lt;p&gt;PeterKelly: New introduction, with links to pages for each major component of OOXML&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Office Open XML (OOXML) is an XML-based file format used for representing word processing documents, spreadsheets, and presentations. It is conceptually similar to ODF in many respects, though a lot of the details differ. OOXML was created by Microsoft and has been used as the default standard in all versions of Office since 2007. It has been published as a standard as both ISO 29500 and ECMA-376.&lt;br /&gt;
&lt;br /&gt;
The official specifications for OOXML, which come in four parts, are available here (search for &amp;quot;29500&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html&lt;br /&gt;
&lt;br /&gt;
There are two versions of OOXML - &amp;quot;Strict&amp;quot; and &amp;quot;Transitional&amp;quot;. The former is a subset of the latter, and excludes certain legacy features that the latter retains to facilitate conversion from the older binary formats. Currently, OOXML Transitional is the only variant in widespread use; OOXML Strict is only fully supported in Office 2013 for Windows, though Office 2010 contains the ability to read (but not write) Strict documents.&lt;br /&gt;
&lt;br /&gt;
OOXML documents of both variants use the .docx, .xlsx, and .pptx extensions for word processing documents, spreadsheets, and presentations, respectively. Thus it is easy to tell the difference between an OOXML file and the older MS Office binary format, which uses .doc, .xls, and .ppt.&lt;br /&gt;
&lt;br /&gt;
The following pages describe various aspects of the standard:&lt;br /&gt;
&lt;br /&gt;
* [[OOXML/Open_Packaging_Conventions_(OPC)|Open Packaging Conventions (OPC)]]&lt;br /&gt;
* [[OOXML/Markup_Compatibility_and_Extensibility|Markup Compatibility and Extensibility]]&lt;br /&gt;
* [[OOXML/WordProcessingML|WordProcessingML]]&lt;br /&gt;
* [[OOXML/SpreadsheetML|SpreadsheetML]]&lt;br /&gt;
* [[OOXML/PresentationML|PresentationML]]&lt;br /&gt;
* [[OOXML/DrawingML|DrawingML]]&lt;br /&gt;
* [[OOXML/Vector_Markup_Language_(VML)|Vector Markup Language (VML)]]&lt;br /&gt;
&lt;br /&gt;
==Status==&lt;br /&gt;
A new import filter is currently (as of May 2014) in development.  Its design and implementation is described on this page.  The legacy importer and exporter is described [[Office_Open_XML/Legacy_Implementation|here]].&lt;br /&gt;
&lt;br /&gt;
The new OOXML import framework is currently in the design stage.  Development is about to begin.&lt;br /&gt;
&lt;br /&gt;
Progress/Todo:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!style=&amp;quot;text-align:left;&amp;quot;|What&lt;br /&gt;
!Who&lt;br /&gt;
!Status&lt;br /&gt;
|-&lt;br /&gt;
|Create new main/ooxml/ module and setup initial build files&lt;br /&gt;
|Andre&lt;br /&gt;
|In progress&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|Specifications&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Collect a list of the relevant schema files.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Determine legal status of OOXML schemas.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Setup map of different specification variants and applications.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Write the schema parser&lt;br /&gt;
|Andre&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|DSL parser&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Finialize DSL design&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
*Implement DSL parser&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Implement OOXML parser generator&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Migrate existing PresentationML import&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==File Format==&lt;br /&gt;
The file format is described by several documents:&lt;br /&gt;
* Specifications:&lt;br /&gt;
** ISO 29500:2012    (http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=61750)&lt;br /&gt;
** ISO 29500:2008&lt;br /&gt;
** ECMA-376          (http://www.ecma-international.org/publications/standards/Ecma-376.htm)&lt;br /&gt;
** (ECMA) TC-45      (http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm)&lt;br /&gt;
* Microsoft Extensions ([http://msdn.microsoft.com/en-us/library/gg548604%28v=office.12%29.aspx Overview]):&lt;br /&gt;
** for PowerPoint (http://msdn.microsoft.com/en-us/library/dd926741%28v=office.12%29.aspx)&lt;br /&gt;
&lt;br /&gt;
There are three main markup languages (MLs) for the three main applications:&lt;br /&gt;
* WordprocessingML&lt;br /&gt;
* SpreadsheetML&lt;br /&gt;
* PresentationML&lt;br /&gt;
Markup languages that are shared by all applications are&lt;br /&gt;
* DrawingML&lt;br /&gt;
* VML (for legacy files)&lt;br /&gt;
&lt;br /&gt;
OOXML files are, similar to ODF files, ZIP containers with one entry per XML stream.  OOXML calls these entries parts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Framework==&lt;br /&gt;
A new framework for the import of OOXML documents is designed to make the import code based on this framework easy to read and easy to develop.  In a compile time pre-processing step the OOXML schema files are read and turned into the OOXML parser skeleton.  A domain specific language (DSL) can then be used to provide the implementation for specific elements (complex types) of the OOXML format.&lt;br /&gt;
&lt;br /&gt;
Details can be found on the [[OOXML Framework]] page.&lt;br /&gt;
&lt;br /&gt;
[[Category:Office Open XML]]&lt;/div&gt;</summary>
		<author><name>PeterKelly</name></author>
	</entry>
</feed>