# XML - Managing Data Exchange/OpenOffice.org & OpenDocument Format

* Chapters
* Appendices
* Exercises
* Computer Science Home
* Library and Information Science Home
* Markup Languages
* To do list
* Contributors list
* Contributing to Wikibooks
| Previous Chapter | Next Chapter |
| ← XMLWebAudio | Google earth → |
* Learning objectives
* Learn how OpenOffice.org uses OpenDocument Format
* Learn about the zip archive
* Learn about OpenOffice capabilites and how to download
* Learn about the future of OpenDocument Format

## Introduction

OpenOffice.org is exactly what its title suggests: an open source office applications suite. It is based on the source of Sun Microsystems' StarOffice, which was donated to the open source community in 2000. OpenOffice.org will read and save files in several formats used by other office applications, but its default format is OpenDocument, which is an XML format standardized by OASIS (Organization for the Advancement of Structured Information Standards). Because of these two factors, an open source editor and XML-based files, OpenOffice.org is poised to be of great importance in the very near future as the trend continues for national governments, particularly in the European Union, to require that all electronic government documents be saved in an open source format.

## OpenDocument Format

As stated in the introduction, OpenDocument is an XML format standardized by OASIS. An OpenDocument file takes the form of a compressed zip archive with one of the following extensions:
* .odt (text)
* .ott (text template)
* .odm (master document)
* .oth (HTML template)
* .ods (spreadsheet)
* .ots (spreadsheet template)
* .odg (drawing)
* .otg (drawing template)
* .odp (presentation)
* .otp (presentation template)
* .odf (formula)
* .odb (database)
(Note that all of these extensions are version 2.0 only)
The zip archive contains the following files and directories (from OpenOffice.org Help documentation):
* The actual text of the document is stored in content.xml. By default this is a stripped-down version of the document that leaves out formatting elements such as indentation or line breaks in order to streamline saving and opening the document.
content.xml Example
* <office:document-content namespace declarations
* office:version="1.0"
* office:class="document type">
* <office:scripts/>
* <office:font-face-decls>
* <!-- font specifications -->
* </office:font-decls>
* <office:styles>
* <office:automatic-styles>
* <!-- style information -->
* </office:automatic-styles>
* </office:styles>
* <office:body>
* <office:documentType>
* <!-- actual content here -->
* </office:documentType>
* </office:body>
* </office:document-content>
* meta.xml contains the meta information of the document, which can be edited in File – Properties. If a document is saved with a password, meta.xml will not be encrypted.
meta.xml Example
* <?xml version="1.0" encoding="UTF-8" ?>
* <office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:ooo="http://openoffice.org/2004/office" office:version="1.0">
* <office:meta>
* <meta:generator>OpenOffice.org/2.0$Win32 OpenOffice.org_project/680m1$Build-8990</meta:generator>
* <meta:initial-creator>Creator Name</meta:initial-creator>
* <meta:creation-date>2006-03-27T19:17:57</meta:creation-date>
* <dc:creator>Creator Name</dc:creator>
* <dc:date>2006-03-27T20:58:06</dc:date>
* <dc:language>en-US</dc:language>
* <meta:editing-cycles>2</meta:editing-cycles>
* <meta:editing-duration>PT1H40M37S</meta:editing-duration>
* <meta:user-defined meta:name="Info 1" />
* <meta:user-defined meta:name="Info 2" />
* <meta:user-defined meta:name="Info 3" />
* <meta:user-defined meta:name="Info 4" />
* <meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="2" meta:paragraph-count="6" meta:word-count="567" meta:character-count="3550" />
* </office:meta>
* </office:document-meta>
* settings.xml contains further information about the settings for this document.
settings.xml Example
* <?xml version="1.0" encoding="UTF-8" ?>
* - <office:document-settings xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" office:version="1.0">
* - <office:settings>
* - <config:config-item-set config:name="ooo:view-settings">
* <config:config-item config:name="ViewAreaTop" config:type="int">635</config:config-item>
* <config:config-item config:name="ViewAreaLeft" config:type="int">0</config:config-item>
* <config:config-item config:name="ViewAreaWidth" config:type="int">25852</config:config-item>
* <config:config-item config:name="ViewAreaHeight" config:type="int">14818</config:config-item>
* <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
* <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
* - <config:config-item-map-indexed config:name="Views">
* - <config:config-item-map-entry>
* <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
* <config:config-item config:name="ViewLeft" config:type="int">17549</config:config-item>
* <config:config-item config:name="ViewTop" config:type="int">4949</config:config-item>
* <config:config-item config:name="VisibleLeft" config:type="int">0</config:config-item>
* <config:config-item config:name="VisibleTop" config:type="int">635</config:config-item>
* <config:config-item config:name="VisibleRight" config:type="int">25850</config:config-item>
* <config:config-item config:name="VisibleBottom" config:type="int">15452</config:config-item>
* <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
* <config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
* <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
* </config:config-item-map-entry>
* </config:config-item-map-indexed>
* </config:config-item-set>
* - <config:config-item-set config:name="ooo:configuration-settings">
* <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
* <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
* <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
* <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
* <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
* <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
* <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
* <config:config-item config:name="UpdateFromTemplate" config:type="boolean">false</config:config-item>
* <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
* <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
* <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
* <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary" />
* <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
* <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
* <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
* <config:config-item config:name="PrinterSetup" config:type="base64Binary" />
* <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
* <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
* <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
* <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
* <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
* <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
* <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
* <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
* <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
* <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
* <config:config-item config:name="CurrentDatabaseDataSource" config:type="string" />
* <config:config-item config:name="PrinterName" config:type="string" />
* <config:config-item config:name="PrintFaxName" config:type="string" />
* <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
* <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
* <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
* <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
* <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
* <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
* <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
* <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
* <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
* <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
* <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
* <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
* <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
* <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
* <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
* <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
* <config:config-item config:name="CurrentDatabaseCommand" config:type="string" />
* <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
* <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
* </config:config-item-set>
* </office:settings>
* </office:document-settings>
* styles.xml contains the styles applied to the document that can be seen in the Styles and Formatting window.
styles.xml Example
* <?xml version="1.0" encoding="UTF-8" ?>
* <office:document-styles xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" office:version="1.0">
* - <office:font-face-decls>
* <style:font-face style:name="Tahoma1" svg:font-family="Tahoma" />
* <style:font-face style:name="Arial Unicode MS" svg:font-family="'Arial Unicode MS'" style:font-pitch="variable" />
* <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable" />
* <style:font-face style:name="Times New Roman" svg:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable" />
* <style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" />
* </office:font-face-decls>
* - <office:styles>
* - <style:default-style style:family="graphic">
* <style:graphic-properties draw:shadow-offset-x="0.1181in" draw:shadow-offset-y="0.1181in" draw:start-line-spacing-horizontal="0.1114in" draw:start-line-spacing-vertical="0.1114in" draw:end-line-spacing-horizontal="0.1114in" draw:end-line-spacing-vertical="0.1114in" style:flow-with-text="false" />
* - <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
* <style:tab-stops />
* </style:paragraph-properties>
* <style:text-properties style:use-window-font-color="true" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-size-asian="12pt" style:language-asian="none" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="none" style:country-complex="none" />
* </style:default-style>
* - <style:default-style style:family="paragraph">
* <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="0.4925in" style:writing-mode="page" />
* <style:text-properties style:use-window-font-color="true" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="en" fo:country="US" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="none" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="none" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" />
* </style:default-style>
* - <style:default-style style:family="table">
* <style:table-properties table:border-model="collapsing" />
* </style:default-style>
* - <style:default-style style:family="table-row">
* <style:table-row-properties fo:keep-together="auto" />
* </style:default-style>
* <style:style style:name="Standard" style:family="paragraph" style:class="text" />
* - <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
* <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.0835in" />
* </style:style>
* - <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
* <style:paragraph-properties fo:margin-top="0.1665in" fo:margin-bottom="0.0835in" fo:keep-with-next="always" />
* <style:text-properties style:font-name="Arial" fo:font-size="14pt" style:font-name-asian="Arial Unicode MS" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-size-complex="14pt" />
* </style:style>
* - <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
* <style:text-properties style:font-name-complex="Tahoma1" />
* </style:style>
* - <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
* <style:paragraph-properties fo:margin-top="0.0835in" fo:margin-bottom="0.0835in" text:number-lines="false" text:line-number="0" />
* <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Tahoma1" style:font-size-complex="12pt" style:font-style-complex="italic" />
* </style:style>
* - <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
* <style:paragraph-properties text:number-lines="false" text:line-number="0" />
* <style:text-properties style:font-name-complex="Tahoma1" />
* </style:style>
* - <text:outline-style>
* - <text:outline-level-style text:level="1" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="2" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="3" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="4" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="5" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="6" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="7" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="8" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="9" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* - <text:outline-level-style text:level="10" style:num-format="">
* <style:list-level-properties text:min-label-distance="0.15in" />
* </text:outline-level-style>
* </text:outline-style>
* <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document" />
* <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0" />
* <text:linenumbering-configuration text:number-lines="false" text:offset="0.1965in" style:num-format="1" text:number-position="left" text:increment="5" />
* </office:styles>
* - <office:automatic-styles>
* - <style:page-layout style:name="pm1">
* - <style:page-layout-properties fo:page-width="8.5in" fo:page-height="11in" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.7874in" fo:margin-bottom="0.7874in" fo:margin-left="0.7874in" fo:margin-right="0.7874in" style:writing-mode="lr-tb" style:footnote-max-height="0in">
* <style:footnote-sep style:width="0.0071in" style:distance-before-sep="0.0398in" style:distance-after-sep="0.0398in" style:adjustment="left" style:rel-width="25%" style:color="#000000" />
* </style:page-layout-properties>
* <style:header-style />
* <style:footer-style />
* </style:page-layout>
* </office:automatic-styles>
* - <office:master-styles>
* <style:master-page style:name="Standard" style:page-layout-name="pm1" />
* </office:master-styles>
* </office:document-styles>
* manifest.xml in the meta-inf directory describes the structure of the XML file.
manifest.xml Example
* <?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE manifest:manifest
* PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
* <manifest:manifest
* xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
* <manifest:file-entry
* manifest:media-type="application/vnd.oasis.opendocument.text"
* manifest:full-path="/"/>
* <manifest:file-entry
* manifest:media-type="application/vnd.sun.xml.ui.configuration"
* manifest:full-path="Configurations2/"/>
* <manifest:file-entry
* manifest:media-type="" manifest:full-path="Pictures/"/>
* <manifest:file-entry
* manifest:media-type="text/xml" manifest:full-path="content.xml"/>
* <manifest:file-entry
* manifest:media-type="text/xml" manifest:full-path="styles.xml"/>
* <manifest:file-entry
* manifest:media-type="text/xml" manifest:full-path="meta.xml"/>
* <manifest:file-entry
* manifest:media-type=""
* manifest:full-path="Thumbnails/thumbnail.png"/>
* <manifest:file-entry
* manifest:media-type="" manifest:full-path="Thumbnails/"/>
* <manifest:file-entry
* manifest:media-type="text/xml" manifest:full-path="settings.xml"/>
* </manifest:manifest>
* Other files and folders may be included in the archive if necessary.
The schema for the OpenDocument formats may be found at http://www.oasis-open.org/committees/download.php/12572/OpenDocument-v1.0-os.pdf (caution: 706 pages).

## Open Office Capabilites

OpenOffice contains WRITER which is OpenOffice.org’s word processor. CALC is a powerful spreadsheet that has all the tools needed to calculate, analyze, summarize, and present data. IMPRESS is a fast and powerful way to create effective multimedia presentations. DRAW will produce everything from simple diagrams to dynamic 3D illustrations and special effects. New to Version 2, BASE enables you to manipulate database data seamlessly within OpenOffice.org. It allows the creation and modification of tables, forms, queries, and reports.
Download at http://download.openoffice.org/

## The Future of OpenDocument

Government and business leaders alike are beginning to realize the importance of open source document formats and to act upon this realization. In July 2005, Norway's Minister of Modernization, Morton A. Meyer, presented a plan for information technology in Norway called “eNorge—the digital leap,” in which open standards and open source are addressed. Meyer's objectives for open standards and open source are as follows:
* Within 2009 all new ICT- and information systems in the public sector shall use open standards.
* Within 2006 a set of management/administrative standards for data and document exchange should be established.
* Within 2006 all operations in the public sector should have introduced plans for how they will use open standards, service oriented architecture and open source.
* Within 2008 all data and document exchange in the public sector shall satisfy the management/administrative standards.
* Within 2008 all public forms shall be built on a common interface.
Also, Meyer said “Proprietary formats will no longer be acceptable in communication between citizens and government.”
In the US, IBM's Vice President of Standards and Open Source, Bob Sutor, made the following recommendations to users in his blog as part of an “Open Document Commitment to Action”:
* Insist today that the provider of your office applications (word processor, spreadsheet, presentation software) is committed to support the OASIS OpenDocument Format for Office Applications standard in their products by January 1, 2007.
* Insist today that the office applications you deploy allow users to easily set the OASIS OpenDocument standard as the default "save" format for your documents. That is, you should not have to go to a lot of trouble to avoid using proprietary formats.
* Get a commitment from your office applications provider to join and contribute to the OASIS OpenDocument standard technical committee.
* Ask your CIO when you will be able to use office applications that support the OASIS OpenDocument standard.
* Ask your local and federal governments when they will be supporting the OASIS OpenDocument standard.
* Insist that any XML document format you use is not encumbered by proprietary extensions, and that the format is freely available for anyone to implement without restrictions, including open source communities that use a GPL license. Ensure that if implementers must accept a license covering the format, the license is clear and unambiguous on these important issues.
* "They are your documents: you should be able to do whatever you want with them, whenever you want, with whatever application you wish to use"
The implications are clear. The computing world is moving toward open source software and file types for information exchange, especially in business and government, and OpenOffice.org, with its XML-based format, stands to be at the front of the pack.

## Additional Links

http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office
http://www.sun.com/software/star/staroffice/index.jsp
http://www.koffice.org/

## Works Cited

“Norwegian Minister says that all public sectors need to make a plan for the use of Open Source by 2005.” Europa—IDABC. July 6, 2005. http://ec.europa.eu/idabc/en/document/4403/469.
Bob Sutor. “Open standards, open source, open minds, open opportunities.” IBM developerWorks. October 11, 2005. http://www-128.ibm.com/developerworks/blogs/dw_blog_comments.jspa?blog=384&entry=97126.
“XML File Formats.” Help documentation, Sun Microsystems, Inc., OpenOffice.org version 2.0, 2000-2005.