Open Document Format for Office Applications (OpenDocument) v1.1

OASIS Standard, 1 Feb 2007

Specification URIs:

This Version:

http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.odt
http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.pdf
http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.html.zip

Previous Version:

http://www.oasis-open.org/committees/download.php/19275/OpenDocument-v1.0ed2-cs1.odt
http://www.oasis-open.org/committees/download.php/19274/OpenDocument-v1.0ed2-cs1.pdf

Latest Version:

http://docs.oasis-open.org/office/v1.1/OpenDocument-v1.1.odt
http://docs.oasis-open.org/office/v1.1/OpenDocument-v1.1.pdf
http://docs.oasis-open.org/office/v1.1/OpenDocument-v1.1.html.zip

Latest Approved Version:

http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.odt
http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.pdf
http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1.html.zip

Technical Committee:

OASIS Open Document Format for Office Applications (OpenDocument) TC

Chair:

Michael Brauer, Sun Microsystems, Inc.

Editors:

Patrick Durusau, Individual

Michael Brauer, Sun Microsystems, Inc.

Lars Oppermann, Sun Microsystems, Inc.

Related Work:

This specification supersedes OASIS OpenDocument v1.0.

Declared XML Namespaces:

A list of XML namespaces declared by this specification is available in section 1.3.

Abstract:

This is the specification of the Open Document Format for Office Applications (OpenDocument) format, an open, XML-based file format for office applications, based on OpenOffice.org XML [OOo].

Status:

This document was last revised or approved by the membership of OASIS on the above date. The level of approval is also listed above. Check the current location noted above for possible later revisions of this document. This document is updated periodically on no particular schedule.

Technical Committee members should send comments on this specification to the Technical Committee's email list. Others should send comments to the Technical Committee by using the "Send A Comment" button on the Technical Committee's web page at

www.oasis-open.org/committees/office.

For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the Technical Committee web page

(www.oasis-open.org/committees/office/ipr.php.

The non-normative errata page for this specification is located at www.oasis-open.org/committees/office.

Notices

Copyright © OASIS® 2002–2007. All Rights Reserved. OASIS trademark, IPR and other policies apply.

All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Committee Specification or OASIS Standard, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification.

OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this specification by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification. OASIS may include such claims on its website, but disclaims any obligation to do so.

OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Committee Specification or OASIS Standard, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.

The names "OASIS", “OpenDocument”, “Open Document Format” and “ODF” are trademarks of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see http://www.oasis-open.org/who/trademark.php for above guidance.

Table of Contents

1 Introduction 33

1.1 Introduction 33

1.2 Notation 33

1.3 Namespaces 33

1.4 Relax-NG Schema 35

1.5 Document Processing and Conformance 36

1.6 White-Space Processing and EOL Handling 37

1.7 MIME Types and File Name Extensions 37

2 Document Structure 39

2.1 Document Roots 39

2.1.1 Document Root Element Content Models 40

2.1.2 Document Root Attributes 41

2.2 Document Metadata 42

2.2.1 Pre-Defined vs. Custom Metadata 42

2.2.2 Sample Metadata 43

2.3 Body Element and Document Types 43

2.3.1 Text Documents 44

2.3.2 Drawing Documents 46

2.3.3 Presentation Documents 47

2.3.4 Spreadsheet Documents 48

2.3.5 Chart Documents 49

2.3.6 Image Documents 49

2.4 Application Settings 50

2.4.1 Sequence of Settings 50

2.4.2 Base Settings 51

2.4.3 Index Access of Sequences 52

2.4.4 Map Entry 52

2.4.5 Name Access of Sequences 53

2.4.6 Cursor Position Setting 53

2.5 Scripts 54

2.5.1 Script 54

2.6 Font Face Declarations 55

2.7 Styles 55

2.7.1 Location of Styles 56

2.8 Page Styles and Layout 58

3 Metadata Elements 59

3.1 Pre-Defined Metadata Elements 59

3.1.1 Generator 59

3.1.2 Title 59

3.1.3 Description 59

3.1.4 Subject 60

3.1.5 Keywords 60

3.1.6 Initial Creator 60

3.1.7 Creator 60

3.1.8 Printed By 60

3.1.9 Creation Date and Time 61

3.1.10 Modification Date and Time 61

3.1.11 Print Date and Time 61

3.1.12 Document Template 61

3.1.13 Automatic Reload 62

3.1.14 Hyperlink Behavior 63

3.1.15 Language 64

3.1.16 Editing Cycles 64

3.1.17 Editing Duration 65

3.1.18 Document Statistics 65

3.2 User-defined Metadata 67

3.3 Custom Metadata 68

4 Text Content 69

4.1 Headings, Paragraphs and Basic Text Structure 69

4.1.1 Headings 69

4.1.2 Paragraphs 70

4.1.3 Common Paragraph Elements Attributes 70

4.2 Page Sequences 71

4.2.1 Page 72

4.3 Lists 73

4.3.1 List Block 73

4.3.2 List Item 74

4.3.3 List Header 76

4.3.4 Numbered Paragraphs 76

4.4 Text Sections 77

4.4.1 Section Attributes 78

4.4.2 Section Source 79

4.4.3 DDE Source 80

4.5 Page-bound graphical content 81

4.6 Change Tracking 81

4.6.1 Tracked Changes 81

4.6.2 Changed Regions 81

4.6.3 Insertion 82

4.6.4 Deletion 82

4.6.5 Format Change 84

4.6.6 Change Info 84

4.6.7 Change Marks 85

4.7 Soft Page Break 85

4.8 Text Declarations 85

5 Paragraph Elements Content 87

5.1 Basic Text Content 87

5.1.1 White-space Characters 87

5.1.2 Soft Hyphens, Hyphens, and Non-breaking Blanks 89

5.1.3 Attributed Text 90

5.1.4 Hyperlinks 90

5.2 Bookmarks and References 93

5.2.1 Bookmarks 93

5.2.2 References 93

5.3 Notes 95

5.3.1 Note Element 95

5.4 Ruby 97

5.5 Text Annotation 97

5.6 Index Marks 98

5.7 Change Tracking and Change Marks 98

5.8 Inline graphics and text-boxes 98

6 Text Fields 99

6.1 Common Characteristics of Field Elements 99

6.2 Document Fields 100

6.2.1 Date Fields 100

6.2.2 Time Fields 101

6.2.3 Page Number Fields 103

6.2.4 Page Continuation Text 104

6.2.5 Sender Fields 105

6.2.6 Author Fields 108

6.2.7 Chapter Fields 108

6.2.8 File Name Fields 109

6.2.9 Document Template Name Fields 110

6.2.10 Sheet Name Fields 111

6.3 Variable Fields 111

6.3.1 Declaring Simple Variables 112

6.3.2 Setting Simple Variables 112

6.3.3 Displaying Simple Variables 113

6.3.4 Simple Variable Input Fields 114

6.3.5 Declaring User Variables 115

6.3.6 Displaying User Variables 115

6.3.7 User Variable Input Fields 116

6.3.8 Declaring Sequence Variables 117

6.3.9 Using Sequence Fields 118

6.3.10 Expression Fields 119

6.3.11 Text Input Fields 120

6.4 Metadata Fields 120

6.4.1 Initial Creator 121

6.4.2 Document Creation Date 121

6.4.3 Document Creation Time 121

6.4.4 Document Description 121

6.4.5 User-Defined Document Information 122

6.4.6 Print Time 122

6.4.7 Print Date 123

6.4.8 Printed By 123

6.4.9 Document Title 123

6.4.10 Document Subject 123

6.4.11 Document Keywords 124

6.4.12 Document Revision Number 124

6.4.13 Document Edit Duration 124

6.4.14 Document Modification Time 124

6.4.15 Document Modification Date 125

6.4.16 Document Modified By 125

6.4.17 Document Statistics Fields 125

6.5 Database Fields 126

6.5.1 Database Field Data Source 127

6.5.2 Displaying Database Content 128

6.5.3 Selecting the Next Database Row 128

6.5.4 Selecting a Row Number 129

6.5.5 Displaying the Row Number 130

6.5.6 Display Current Database and Table 131

6.6 More Fields 131

6.6.1 Page Variable Fields 131

6.6.2 Placeholders 132

6.6.3 Conditional Text Fields 133

6.6.4 Hidden Text Field 135

6.6.5 Reference Fields 136

6.6.6 Script Fields 138

6.6.7 Macro Fields 139

6.6.8 Hidden Paragraph Fields 140

6.6.9 DDE Connection Fields 141

6.6.10 Measure Fields 141

6.6.11 Table Formula Field 142

6.7 Common Field Attributes 142

6.7.1 Variable Value Types and Values 142

6.7.2 Fixed 144

6.7.3 Variable Name 145

6.7.4 Description 145

6.7.5 Display 145

6.7.6 Formula 146

6.7.7 Formatting Style 147

6.7.8 Number Formatting Style 147

7 Text Indices 149

7.1 Index Marks 149

7.1.1 Table of Content Index Marks 149

7.1.2 User-Defined Index Marks 150

7.1.3 Alphabetical Index Mark 151

7.1.4 Bibliography Index Mark 153

7.2 Index Structure 154

7.2.1 Index Source 154

7.2.2 Index Body Section 155

7.2.3 Index Title Section 155

7.3 Table Of Content 155

7.3.1 Table of Content Source 156

7.3.2 Table of Content Entry Template 158

7.4 Index of Illustrations 159

7.4.1 Index of Illustration Source 160

7.4.2 Illustration Index Entry Template 161

7.5 Index of Tables 162

7.5.1 Table Index Source 162

7.5.2 Table Index Entry Template 163

7.6 Index of Objects 163

7.6.1 Object Index Source 163

7.6.2 Object Index Entry Template 165

7.7 User-Defined Index 165

7.7.1 User-Defined Index Source 165

7.7.2 User-Defined Index Entry Template 167

7.8 Alphabetical Index 168

7.8.1 Alphabetical Index Source 168

7.8.2 Auto Mark File 172

7.8.3 Alphabetical Index Entry Template 172

7.9 Bibliography 173

7.9.1 Bibliography Index Source 173

7.9.2 Bibliography Entry Template 174

7.10 index source styles 174

7.10.1 Index source style 175

7.11 Index title template 175

7.12 Index Template Entries 175

7.12.1 Chapter Information 176

7.12.2 Entry Text 176

7.12.3 Page Number 176

7.12.4 Fixed String 177

7.12.5 Bibliography Information 177

7.12.6 Tab Stop 178

7.12.7 Hyperlink Start and End 179

7.12.8 Example of an Index Entry Configuration 180

8 Tables 182

8.1 Basic Table Model 182

8.1.1 Table Element 182

8.1.2 Table Row 186

8.1.3 Table Cell 188

8.2 Advanced Table Model 193

8.2.1 Column Description 193

8.2.2 Header Columns 195

8.2.3 Column Groups 195

8.2.4 Header Rows 196

8.2.5 Row Groups 196

8.2.6 Subtables 197

8.3 Advanced Tables 200

8.3.1 Referencing Table Cells 200

8.3.2 Linked Tables 202

8.3.3 Scenario Tables 204

8.3.4 Shapes 206

8.4 Advanced Table Cells 207

8.4.1 Linked Table Cells 207

8.4.2 Cell Annotation 208

8.4.3 Detective 208

8.4.4 Detective Operation 208

8.4.5 Highlighted Range 209

8.5 Spreadsheet Document Content 211

8.5.1 Document Protection 211

8.5.2 Calculation Settings 211

8.5.3 Table Cell Content Validations 214

8.5.4 Label Ranges 218

8.5.5 Named Expressions 219

8.6 Database Ranges 221

8.6.1 Database Range 222

8.6.2 Database Source SQL 225

8.6.3 Database Source Table 225

8.6.4 Database Source Query 226

8.6.5 Sort 227

8.6.6 Sort By 228

8.6.7 Subtotal Rules 229

8.6.8 Subtotal Sort Groups 230

8.6.9 Subtotal Rule 231

8.6.10 Subtotal Field 232

8.7 Filters 233

8.7.1 Table Filter 233

8.7.2 Filter And 234

8.7.3 Filter Or 235

8.7.4 Filter Condition 235

8.8 Data Pilot Tables 237

8.8.1 Data Pilot Table 237

8.8.2 Source Cell Range 242

8.8.3 Source Service 243

8.8.4 Data Pilot Field 244

8.8.5 Data Pilot Level 246

8.8.6 Data Pilot Subtotals 247

8.8.7 Data Pilot Subtotal 247

8.8.8 Data Pilot Members 248

8.8.9 Data Pilot Member 248

8.8.10 Data Pilot Display Info 249

8.8.11 Data Pilot Sort Info 250

8.8.12 Data Pilot Layout Info 251

8.8.13 Data Pilot Field Reference 252

8.8.14 Data Pilot Groups 254

8.8.15 Data Pilot Group 256

8.8.16 Data Pilot Group Member 257

8.9 Consolidation 257

8.10 DDE Links 259

8.11 Change Tracking in Spreadsheets 259

8.11.1 Tracked Changes 259

8.11.2 Insertion 260

8.11.3 Dependencies 261

8.11.4 Dependence 261

8.11.5 Deletions 262

8.11.6 Cell Content Deletion 262

8.11.7 Change Deletion 262

8.11.8 Deletion 263

8.11.9 Cut Offs 264

8.11.10 Insertion Cut Off 265

8.11.11 Movement Cut Off 265

8.11.12 Movement 266

8.11.13 Target Range Address, Source Range Address 267

8.11.14 Change Track Cell 268

8.11.15 Cell Content Change 269

8.11.16 Cell Address 270

8.11.17 Previous 270

8.11.18 Common Change Tracking Attributes 270

9 Graphic Content 272

9.1 Enhanced Page Features for Graphical Applications 272

9.1.1 Handout Master 272

9.1.2 Layer Sets 273

9.1.3 Layer 274

9.1.4 Drawing Pages 275

9.1.5 Presentation Notes 278

9.2 Drawing Shapes 279

9.2.1 Rectangle 279

9.2.2 Line 280

9.2.3 Polyline 281

9.2.4 Polygon 282

9.2.5 Regular Polygon 283

9.2.6 Path 285

9.2.7 Circle 286

9.2.8 Ellipse 288

9.2.9 Connector 289

9.2.10 Caption 293

9.2.11 Measure 294

9.2.12 Control 295

9.2.13 Page Thumbnail 296

9.2.14 Grouping 297

9.2.15 Common Drawing Shape Attributes 298

9.2.16 Common Shape Attributes for Text and Spreadsheet Documents 302

9.2.17 Common Drawing Shape Content 305

9.2.18 Common Shape Attribute Groups 305

9.2.19 Glue Points 305

9.2.20 Title and Description 307

9.2.21 Event Listeners 308

9.3 Frames 308

9.3.1 Text Box 311

9.3.2 Image 313

9.3.3 Objects 314

9.3.4 Applet 316

9.3.5 Plugins 318

9.3.6 Parameters 319

9.3.7 Floating Frame 319

9.3.8 Contour 320

9.3.9 Hyperlinks 321

9.3.10 Client Side Image Maps 323

9.4 3D Shapes 327

9.4.1 Scene 327

9.4.2 Light 331

9.4.3 Cube 332

9.4.4 Sphere 333

9.4.5 Extrude 334

9.4.6 Rotate 334

9.5 Custom Shape 335

9.5.1 Enhanced Geometry 336

9.5.2 Enhanced Geometry - Extrusion Attributes 339

9.5.3 Enhanced Geometry - Path Attributes 345

9.5.4 Enhanced Geometry - Text Path Attributes 349

9.5.5 Enhanced Geometry – Equation 350

9.5.6 Enhanced Geometry - Handle Attributes 352

9.6 Presentation Shapes 356

9.6.1 Common Presentation Shape Attributes 356

9.7 Presentation Animations 358

9.7.1 Sound 359

9.7.2 Show Shape 360

9.7.3 Show Text 363

9.7.4 Hide Shape 364

9.7.5 Hide Text 364

9.7.6 Dim 364

9.7.7 Play 365

9.7.8 Effect groups 365

9.8 SMIL Presentation Animations 365

9.8.1 Recommended Usage Of SMIL 366

9.8.2 Document Dependent SMIL Animation Attribute Values 367

9.8.3 SMIL Presentation Animation Attributes 369

9.9 Presentation Events 372

9.10 Presentation Text Fields 375

9.10.1 Header Field 375

9.10.2 Footer Field 375

9.10.3 Date and Time Field 375

9.11 Presentation Document Content 376

9.11.1 Presentation Declarations 376

9.11.2 Header field declaration 376

9.11.3 Footer field declaration 376

9.11.4 Date and Time field declaration 377

9.11.5 Presentation Settings 377

9.11.6 Show Definitions 381

10 Chart Content 383

10.1 Introduction to Chart Documents 383

10.2 Chart 383

10.3 Title, Subtitle and Footer 387

10.3.1 Title 387

10.3.2 Subtitle 388

10.3.3 Footer 388

10.4 Legend 388

10.5 Plot Area 390

10.5.1 3D Plot Area 392

10.6 Wall 392

10.7 Floor 393

10.8 Axis 394

10.8.1 Grid 395

10.9 Series 396

10.9.1 Domain 398

10.10 Categories 398

10.11 Data Point 398

10.12 Mean Value 399

10.13 Error Indicator 400

10.14 Regression Curves 400

10.14.1 Stock Chart Markers 401

11 Form Content 402

11.1 Form 403

11.1.1 Action 404

11.1.2 Target Frame 404

11.1.3 Method 405

11.1.4 Encoding Type 405

11.1.5 Allow Deletes 405

11.1.6 Allow Inserts 406

11.1.7 Allow Updates 406

11.1.8 Apply Filter 406

11.1.9 Command Type 406

11.1.10 Command 407

11.1.11 Data Source 407

11.1.12 Master Fields 407

11.1.13 Detail Fields 408

11.1.14 Escape Processing 408

11.1.15 Filter 408

11.1.16 Ignore Result 408

11.1.17 Navigation Mode 409

11.1.18 Order 409

11.1.19 Tabbing Cycle 409

11.1.20 Connection Resource 410

11.2 XForms Model 410

11.2.1 XForms Model 411

11.3 Controls 411

11.3.1 Text 412

11.3.2 Text Area 412

11.3.3 Password 413

11.3.4 File 414

11.3.5 Formatted Text 414

11.3.6 Number 416

11.3.7 Date And Time 417

11.3.8 Fixed Text 419

11.3.9 Combo Box 419

11.3.10 List Box 421

11.3.11 Button 422

11.3.12 Image 424

11.3.13 Check Box 424

11.3.14 Radio Button 426

11.3.15 Frame 427

11.3.16 Image Frame 427

11.3.17 Hidden 427

11.3.18 Grid 428

11.3.19 Value Range 429

11.3.20 Generic Control 431

11.4 Common Form and Control Attributes 431

11.4.1 Name 431

11.4.2 Control Implementation 432

11.4.3 Bind to XForms 432

11.5 Common Control Attributes 432

11.5.1 Button Type 432

11.5.2 Control ID 433

11.5.3 Current Selected 434

11.5.4 Value and Current Value 434

11.5.5 Disabled 435

11.5.6 Dropdown 436

11.5.7 For 436

11.5.8 Image Data 437

11.5.9 Label 437

11.5.10 Maximum Length 437

11.5.11 Printable 438

11.5.12 Read only 439

11.5.13 Selected 439

11.5.14 Size 439

11.5.15 Tab Index 440

11.5.16 Tab Stop 441

11.5.17 Target Frame 441

11.5.18 Target Location 442

11.5.19 Title 442

11.5.20 Visual Effect 443

11.5.21 Relative Image Position 443

11.5.22 Database Binding Attributes 444

11.6 Event Listeners 446

11.7 Properties 448

11.7.1 Property Set 448

11.7.2 Property 448

11.7.3 List Property 449

12 Common Content 452

12.1 Annotation 452

12.1.1 Creator 453

12.1.2 Creation Date and Time 453

12.1.3 Creation Date and Time String 453

12.2 Number Format 453

12.2.1 Prefix and Suffix 453

12.2.2 Format Specification 454

12.2.3 Letter Synchronization in Number Formats 454

12.3 Change Tracking Metadata 455

12.4 Event Listener Tables 455

12.4.1 Event Listener 456

12.4.2 Event Types 457

12.5 Mathematical Content 458

12.6 DDE Connections 459

12.6.1 Container for DDE Connection Declarations 459

12.6.2 Declaring DDE Connections for Text Fields 459

12.6.3 Declaring DDE Connections for Tables 461

13 SMIL Animations 463

13.1 Basic Animation Elements 463

13.1.1 Animate 463

13.1.2 Set 463

13.1.3 Animate Motion 463

13.1.4 Animate Color 464

13.1.5 Animate Transform 465

13.1.6 Transition Filter 466

13.2 Animation Model Attributes 467

13.3 Common Animation Attributes 467

13.3.1 Animation Target Attributes 468

13.3.2 Animation Function Attributes 468

13.4 Animation Timing 471

13.4.1 Animation Timing Attributes 471

13.4.2 Parallel Animations 475

13.4.3 Sequential Animations 475

13.4.4 Iterative Animations 475

13.5 Media Elements 476

13.5.1 Audio 476

13.6 Special Elements 477

13.6.1 Command 477

14 Styles 479

14.1 Style Element 479

14.1.1 Style Mappings 483

14.2 Default Styles 485

14.3 Page Layout 485

14.3.1 Header and Footer Styles 486

14.4 Master Pages 487

14.4.1 Headers and Footers 489

14.4.2 Presentation Notes 491

14.5 Table Templates 493

14.5.1 Row and Column Styles 494

14.6 Font Face Declaration 496

14.6.1 CSS2/SVG Font Descriptors 496

14.6.2 Name 500

14.6.3 Adornments 500

14.6.4 Font Family Generic 500

14.6.5 Font Pitch 501

14.6.6 Font Character Set 501

14.7 Data Styles 501

14.7.1 Number Style 501

14.7.2 Currency Style 505

14.7.3 Percentage Style 507

14.7.4 Date Style 508

14.7.5 Time Style 513

14.7.6 Boolean Style 517

14.7.7 Text Style 517

14.7.8 Common Data Style Elements 518

14.7.9 Common Data Style Attributes 519

14.7.10 Transliteration 522

14.7.11 Common Data Style Child Element Attributes 523

14.8 Text Styles 525

14.8.1 Text Styles 525

14.8.2 Paragraph Styles 525

14.8.3 Section Styles 526

14.8.4 Ruby Style 526

14.9 Enhanced Text Styles 526

14.9.1 Line Numbering Configuration 526

14.9.2 Notes Configuration Element 530

14.9.3 Bibliography Configuration 533

14.10 List Style 535

14.10.1 Common List-Level Style Attributes 536

14.10.2 Number Level Style 537

14.10.3 Bullet Level Style 538

14.10.4 Image Level Style 540

14.10.5 List Level Style Example 541

14.11 Outline Style 541

14.11.1 Outline Level Style 542

14.12 Table Styles 543

14.12.1 Table Styles 543

14.12.2 Table Column Styles 544

14.12.3 Table Row Styles 544

14.12.4 Table Cell Styles 544

14.13 Graphic Styles 545

14.13.1 Graphic and Presentation Styles 545

14.13.2 Drawing Page Style 545

14.14 Enhanced Graphic Style Elements 546

14.14.1 Gradient 546

14.14.2 SVG Gradients 549

14.14.3 Hatch 552

14.14.4 Fill Image 554

14.14.5 Opacity Gradient 555

14.14.6 Marker 556

14.14.7 Stroke Dash 557

14.15 Presentation Page Layouts 559

14.15.1 Presentation Placeholder 559

14.16 Chart Styles 560

15 Formatting Properties 561

15.1 Simple and Complex Formatting Properties 561

15.1.1 Simple Formatting Properties 561

15.1.2 Complex Formatting Properties 562

15.1.3 Processing Rules for Formatting Properties 562

15.2 Page Layout Formatting Properties 562

15.2.1 Page Size 563

15.2.2 Page Number Format 563

15.2.3 Paper Tray 564

15.2.4 Print Orientation 564

15.2.5 Margins 564

15.2.6 Border 565

15.2.7 Border Line Width 565

15.2.8 Padding 565

15.2.9 Shadow 565

15.2.10 Background 565

15.2.11 Columns 566

15.2.12 Register-truth 566

15.2.13 Print 566

15.2.14 Print Page Order 567

15.2.15 First Page Number 567

15.2.16 Scale 567

15.2.17 Table Centering 568

15.2.18 Maximum Footnote Height 568

15.2.19 Writing Mode 569

15.2.20 Footnote Separator 569

15.2.21 Layout Grid 570

15.2.22 Layout Grid Base Height 570

15.2.23 Layout Grid Ruby Height 571

15.2.24 Layout Grid Lines 571

15.2.25 Layout Grid Color 571

15.2.26 Layout Grid Ruby Below 571

15.2.27 Layout Grid Print 572

15.2.28 Layout Grid Display 572

15.3 Header Footer Formatting Properties 572

15.3.1 Fixed and Minimum heights 573

15.3.2 Margins 573

15.3.3 Border 573

15.3.4 Border Line Width 573

15.3.5 Padding 574

15.3.6 Background 574

15.3.7 Shadow 574

15.3.8 Dynamic Spacing 574

15.4 Text Formatting Properties 575

15.4.1 Font Variant 575

15.4.2 Text Transformations 575

15.4.3 Color 576

15.4.4 Window Font Color 576

15.4.5 Text Outline 576

15.4.6 Line-Through Type 576

15.4.7 Line-Through Style 577

15.4.8 Line-Through Width 577

15.4.9 Line-Through Color 577

15.4.10 Line-Through Text 578

15.4.11 Line-Through Text Style 578

15.4.12 Text Position 578

15.4.13 Font Name 579

15.4.14 Font Family 579

15.4.15 Font Family Generic 580

15.4.16 Font Style 581

15.4.17 Font Pitch 581

15.4.18 Font Character Set 582

15.4.19 Font Size 582

15.4.20 Relative Font Size 583

15.4.21 Script Type 584

15.4.22 Letter Spacing 584

15.4.23 Language 584

15.4.24 Country 585

15.4.25 Font Style 585

15.4.26 Font Relief 586

15.4.27 Text Shadow 586

15.4.28 Underlining Type 587

15.4.29 Underlining Style 587

15.4.30 Underling Width 588

15.4.31 Underline Color 588

15.4.32 Font Weight 588

15.4.33 Text Underline Word Mode 589

15.4.34 Text Line-Through Word Mode 589

15.4.35 Letter Kerning 590

15.4.36 Text Blinking 590

15.4.37 Text Background Color 590

15.4.38 Text Combine 590

15.4.39 Text Combine Start and End Characters 591

15.4.40 Text Emphasis 591

15.4.41 Text Scale 592

15.4.42 Text Rotation Angle 592

15.4.43 Text Rotation Scale 592

15.4.44 Hyphenation 592

15.4.45 Hyphenation Remain Char Count 593

15.4.46 Hyphenation Push Char Count 593

15.4.47 Hidden or Conditional Text 593

15.5 Paragraph Formatting Properties 594

15.5.1 Fixed Line Height 594

15.5.2 Minimum Line Height 595

15.5.3 Line Distance 595

15.5.4 Font-Independent Line Spacing 595

15.5.5 Text Align 595

15.5.6 Text Align of Last Line 596

15.5.7 Justify Single Word 596

15.5.8 Keep Together 597

15.5.9 Widows 597

15.5.10 Orphans 597

15.5.11 Tab Stops 597

15.5.12 Tab Stop Distance 601

15.5.13 Hyphenation Keep 601

15.5.14 Maximum Hyphens 601

15.5.15 Drop Caps 602

15.5.16 Register True 603

15.5.17 Left and Right Margins 603

15.5.18 Text Indent 604

15.5.19 Automatic Text Indent 604

15.5.20 Top and Bottom Margins 605

15.5.21 Margins 605

15.5.22 Break Before and Break After 605

15.5.23 Paragraph Background Color 606

15.5.24 Paragraph Background Image 606

15.5.25 Border 609

15.5.26 Border Line Width 609

15.5.27 Padding 610

15.5.28 Shadow 611

15.5.29 Keep with Next 612

15.5.30 Line Numbering 612

15.5.31 Line Number Start Value 612

15.5.32 Text Autospace 612

15.5.33 Punctuation Wrap 613

15.5.34 Line Break 613

15.5.35 Vertical Alignment 613

15.5.36 Writing Mode 614

15.5.37 Automatic Writing Mode 614

15.5.38 Snap To Layout 615

15.5.39 Page Number 615

15.5.40 Background Transparency 615

15.6 Ruby Text Formatting Properties 615

15.6.1 Ruby Position 616

15.6.2 Ruby Alignment 616

15.7 Section Formatting Properties 616

15.7.1 Section Background 617

15.7.2 Margins 617

15.7.3 Columns 617

15.7.4 Column Specification 618

15.7.5 Column Separator 620

15.7.6 Protect 621

15.7.7 Don't Balance Text Columns 621

15.7.8 Writing Mode 622

15.7.9 Notes Configuration 622

15.8 Table Formatting Properties 622

15.8.1 Table Width 622

15.8.2 Table Alignment 623

15.8.3 Table Left and Right Margin 623

15.8.4 Table Top and Bottom Margin 624

15.8.5 Table Margins 624

15.8.6 Page Number 624

15.8.7 Break Before and Break After 624

15.8.8 Table Background and Background Image 624

15.8.9 Table Shadow 624

15.8.10 Keep with Next 625

15.8.11 May Break Between Rows 625

15.8.12 Border Model Property 625

15.8.13 Writing Mode 626

15.8.14 Display 626

15.9 Column Formatting Properties 626

15.9.1 Column Width 626

15.9.2 Optimal Table Column Width 627

15.9.3 Break Before and Break After 627

15.10 Table Row Formatting Properties 627

15.10.1 Row Height 627

15.10.2 Optimal Table Row Height 628

15.10.3 Row Background 628

15.10.4 Break Before and Break After 628

15.10.5 Keep Together 628

15.11 Table Cell Formatting Properties 629

15.11.1 Vertical Alignment 629

15.11.2 Text Align Source 629

15.11.3 Direction 630

15.11.4 Vertical Glyph Orientation 630

15.11.5 Cell Shadow 630

15.11.6 Cell Background 631

15.11.7 Cell Border 631

15.11.8 Diagonal Lines 631

15.11.9 Border Line Width 632

15.11.10 Padding 632

15.11.11 Wrap Option 632

15.11.12 Rotation Angle 632

15.11.13 Rotation Align 633

15.11.14 Cell Protect 633

15.11.15 Print Content 633

15.11.16 Decimal places 634

15.11.17 Repeat Content 634

15.11.18 Shrink To Fit 634

15.12 List-Level Style Properties 635

15.13 Stroke Properties 637

15.13.1 Stroke Style 637

15.13.2 Dash 638

15.13.3 Multiple Dashes 638

15.13.4 Width 638

15.13.5 Color 638

15.13.6 Start Marker 638

15.13.7 End Marker 639

15.13.8 Start Marker Width 639

15.13.9 End Marker Width 639

15.13.10 Start Marker Center 639

15.13.11 End Marker Center 640

15.13.12 Opacity 640

15.13.13 Line Join 640

15.14 Fill Properties 640

15.14.1 Fill Style 641

15.14.2 Color 641

15.14.3 Secondary Fill Color 642

15.14.4 Gradient 642

15.14.5 Gradient Step Count 642

15.14.6 Hatch 642

15.14.7 Solid Hatch 643

15.14.8 Fill Image 643

15.14.9 Fill Image Rendering Style 643

15.14.10 Fill Image Size 643

15.14.11 Fill Image Tile Reference Point 644

15.14.12 Fill Image Tile Translation 645

15.14.13 None and Linear Opacity 645

15.14.14 Gradient Opacity 645

15.14.15 Fill Rule 645

15.14.16 Symbol color 646

15.15 Text Animation Properties 646

15.15.1 Animation 646

15.15.2 Animation Direction 647

15.15.3 Animation Start Inside 647

15.15.4 Animation Stop Inside 647

15.15.5 Animation Repeat 647

15.15.6 Animation Delay 648

15.15.7 Animation Steps 648

15.16 Text and Text Alignment Properties 648

15.16.1 Auto Grow Width and Height 648

15.16.2 Fit To Size 649

15.16.3 Fit To Contour 649

15.16.4 Text Area Vertical Align 649

15.16.5 Text Area Horizontal Align 649

15.16.6 Word Wrap 650

15.16.7 List Styles 650

15.17 Color Properties 650

15.17.1 Color Mode 650

15.17.2 Color Inversion 651

15.17.3 Adjust Luminance 651

15.17.4 Adjust Contrast 651

15.17.5 Adjust Gamma 651

15.17.6 Adjust Red 652

15.17.7 Adjust Green 652

15.17.8 Adjust Blue 652

15.17.9 Adjust Opacity 652

15.18 Shadow Properties 652

15.18.1 Shadow 653

15.18.2 Offset 653

15.18.3 Color 653

15.18.4 Opacity 653

15.19 Connector Properties 654

15.19.1 Start Line Spacing 654

15.19.2 End Line Spacing 654

15.20 Measure Properties 654

15.20.1 Line Distance 654

15.20.2 Guide Overhang 655

15.20.3 Guide Distance 655

15.20.4 Start Guide 655

15.20.5 End Guide 655

15.20.6 Placing 656

15.20.7 Parallel 656

15.20.8 Text Alignment 656

15.20.9 Unit 657

15.20.10 Show Unit 657

15.20.11 Decimal Places 657

15.21 Caption Properties 657

15.21.1 Type 658

15.21.2 Angle Type 658

15.21.3 Angle 658

15.21.4 Gap 659

15.21.5 Escape Direction 659

15.21.6 Escape 659

15.21.7 Line Length 660

15.21.8 Fit Line Length 660

15.22 3D Geometry Properties 660

15.22.1 Horizontal Segments 660

15.22.2 Vertical Segments 660

15.22.3 Edge Rounding 661

15.22.4 Edge Rounding Mode 661

15.22.5 Back Scale 661

15.22.6 Depth 661

15.22.7 Backface Culling 662

15.22.8 End Angle 662

15.22.9 Close Front 662

15.22.10 Close Back 662

15.23 3D Lighting Properties 663

15.23.1 Mode 663

15.23.2 Normals Kind 663

15.23.3 Normals Direction 663

15.24 3D Texture Properties 664

15.24.1 Generation Mode 664

15.24.2 Kind 664

15.24.3 Filter 665

15.24.4 Mode 665

15.25 3D Material Properties 665

15.25.1 Colors 665

15.25.2 Shininess 666

15.26 3D Shadow Properties 666

15.26.1 Shadow 666

15.27 Frame Formatting Properties 666

15.27.1 Frame Widths 666

15.27.2 Frame Heights 667

15.27.3 Maximum Width and Height 667

15.27.4 Left and Right Margins 668

15.27.5 Top and Bottom Margins 668

15.27.6 Margins 668

15.27.7 Print Content 668

15.27.8 Protect 668

15.27.9 Horizontal Position 669

15.27.10 Horizontal Relation 670

15.27.11 Vertical Position 671

15.27.12 Vertical Relation 672

15.27.13 Frame Anchor 673

15.27.14 Border 673

15.27.15 Border Line Width 673

15.27.16 Padding 673

15.27.17 Shadow 674

15.27.18 Background 674

15.27.19 Columns 674

15.27.20 Editable 674

15.27.21 Wrapping 674

15.27.22 Dynamic Wrap Threshold 675

15.27.23 Paragraph-only Wrapping 675

15.27.24 Contour Wrapping 676

15.27.25 Contour Wrapping Mode 676

15.27.26 Run Through 676

15.27.27 Flow with Text 677

15.27.28 Overflow behavior 677

15.27.29 Mirroring 677

15.27.30 Clipping 678

15.27.31 Wrap Influence on Position 678

15.27.32 Writing Mode 679

15.28 Floating Frame Formatting Properties 679

15.28.1 Display Scrollbar 679

15.28.2 Display Border 680

15.28.3 Margins 680

15.28.4 Object Formatting Properties 680

15.28.5 Visible Area 680

15.28.6 Draw Aspect 681

15.29 Chart Formatting Properties 681

15.29.1 Scale Text 682

15.30 Chart Subtype Properties 682

15.30.1 Three-dimensional Charts 682

15.30.2 Chart Depth 682

15.30.3 Chart Symbol 683

15.30.4 Chart Symbol Size 683

15.30.5 Bar Chart Properties 684

15.30.6 Stock Chart Properties 684

15.30.7 Line Chart Properties 685

15.30.8 Pie Chart Properties 686

15.30.9 Lines 686

15.30.10 Solid Charts Bars 686

15.30.11 Stacked Chart Bars 686

15.31 Chart Axes Properties 687

15.31.1 Linked Data Formats 687

15.31.2 Visibility 687

15.31.3 Scaling 687

15.31.4 Tick Marks 688

15.31.5 Labels 689

15.32 Common Chart Properties 689

15.32.1 Stacked Text 690

15.32.2 Rotation Angle 690

15.32.3 Data Labels 690

15.33 Statistical Properties 691

15.33.1 Mean Value 691

15.33.2 Error Category 691

15.34 Plot Area Properties 693

15.34.1 Series Source 693

15.35 Regression Curve Properties 693

15.35.1 Regression Type 694

15.36 Presentation Page Attributes 694

15.36.1 Transition Type 695

15.36.2 Transition Style 695

15.36.3 Transition Speed 697

15.36.4 Transition Type or Family 698

15.36.5 Transition Subtype 698

15.36.6 Transition Direction 698

15.36.7 Fade Color 698

15.36.8 Page Duration 699

15.36.9 Page Visibility 699

15.36.10 Sound 699

15.36.11 Background Size 699

15.36.12 Background Objects Visible 700

15.36.13 Background Visible 700

15.36.14 Display Header 700

15.36.15 Display Footer 700

15.36.16 Display Page Number 701

15.36.17 Display Date And Time 701

16 Data Types and Schema Definitions 702

16.1 Data Types 702

16.2 Other Definitions 707

16.3 Relax-NG Schema Suffix 708

17 Packages 709

17.1 Introduction 709

17.2 Zip File Structure 709

17.3 Encryption 710

17.4 MIME Type Stream 710

17.5 Usage of IRIs Within Packages 711

17.6 Preview Image 711

17.7 Manifest File 711

17.7.1 Relax-NG Schema 712

17.7.2 Manifest Root Element 712

17.7.3 File Entry 712

17.7.4 Encryption Data 713

17.7.5 Algorithm 714

17.7.6 Key Derivation 715

17.7.7 Relax-NG Schema Suffix 717

Appendix A. Strict Relax NG Schema 718

Appendix B. References 720

Appendix C. MIME Types and File Name Extensions (Non Normative) 722

Appendix D. Core Features Sets (Non Normative) 724

Appendix E. Accessibility Guidelines (Non Normative) 729

E.1. Title, Description and Caption of Graphical Elements 729

E.2. Hyperlink Titles 729

E.3. Tables in Presentations 730

E.4. Further Guidelines 730

Appendix F. Bidirectional (BiDi) Scripts,Numeric Digits Presentation and Calendars (Non Normative) 731

Appendix G. Changes From Previous Specification Versions (Non Normative) 733

G.1. Changes from “Open Office Specification 1.0 Committee Draft 1” 733

G.2. Changes from “Open Document Format for Office Applications (OpenDocument) 1.0 Committee Draft 2” 733

G.3. Changes from “Open Document Format for Office Applications (OpenDocument) v1.0” 734

G.4. Changes from “Open Document Format for Office Applications (OpenDocument) v1.0 (Second Edition)” 734

Appendix H. Acknowledgments (Non Normative) 737



1 Introduction

1.1 Introduction

This document defines an XML schema for office applications and its semantics. The schema is suitable for office documents, including text documents, spreadsheets, charts and graphical documents like drawings or presentations, but is not restricted to these kinds of documents.

The schema provides for high-level information suitable for editing documents. It defines suitable XML structures for office documents and is friendly to transformations using XSLT or similar XML-based tools.

Chapter 1 contains the introduction to the OpenDocument format. The structure of documents that conform to the OpenDocument specification is explained in chapter 2. Chapter 3 described the meta information that can be contained in such documents. Chapters 4 and 5 describe their text and paragraph content. Text Fields are described in chapter 6, text indices in chapter 7.

Chapter 8 describes the table content of a document in OpenDocument format, chapter 9 its graphical content, chapter 10 its chart content, and chapter 11 its form content. Content that is common to all documents is described in chapter 12. The integration of SMIL animation markup into the OpenDocument schema is described in chapter 13. Chapter 14 explains style information content, chapter 15 specifies formatting properties that are can be used within styles. The data types used by the OpenDocument schema are described in chapter 16.

The OpenDocument format makes use of a package concept. These packages are described in chapter 17.

1.2 Notation

Within this specification, the key words "shall", "shall not", "should", "should not" and "may" are to be interpreted as described in Annex H of [ISO/IEC Directives] if they appear in bold letters.

1.3 Namespaces

Table 1 lists the namespaces that are defined by the OpenDocument format and their default prefixes. For more information about XML namespaces, please refer to the Namespaces in XML specification [xml-names].

Table 1: XML Namespaces defined by the OpenDocument schema

Prefix

Description

Namespace

office

For all common pieces of information that are not contained in another, more specific namespace.

urn:oasis:names:tc:opendocument:xmlns:
office:1.0

meta

For elements and attributes that describe meta information.

urn:oasis:names:tc:opendocument:xmlns:
meta:1.0

config

For elements and attributes that describe application specific settings.

urn:oasis:names:tc:opendocument:xmlns:
config:1.0

text

For elements and attributes that may occur within text documents and text parts of other document types, such as the contents of a spreadsheet cell.

urn:oasis:names:tc:opendocument:xmlns:
text:1.0

table

For elements and attributes that may occur within spreadsheets or within table definitions of a text document.

urn:oasis:names:tc:opendocument:xmlns:
table:1.0

drawing

For elements and attributes that describe graphic content.

urn:oasis:names:tc:opendocument:xmlns:
drawing:1.0

presentation

For elements and attributes that describe presentation content.

urn:oasis:names:tc:opendocument:xmlns:
presentation:1.0

dr3d

For elements and attributes that describe 3D graphic content.

urn:oasis:names:tc:opendocument:xmlns:
dr3d:1.0

anim

For elements and attributes that describe animation content.

urn:oasis:names:tc:opendocument:xmlns:
animation:1.0

chart

For elements and attributes that describe chart content.

urn:oasis:names:tc:opendocument:xmlns:
chart:1.0

form

For elements and attributes that describe forms and controls.

urn:oasis:names:tc:opendocument:xmlns:
form:1.0

script

For elements and attributes that represent scripts or events.

urn:oasis:names:tc:opendocument:xmlns:
script:1.0

style

For elements and attributes that describe the style and inheritance model used by the OpenDocument format as well as some common formatting attributes.

urn:oasis:names:tc:opendocument:xmlns:
style:1.0

number

For elements and attributes that describe data style information.

urn:oasis:names:tc:opendocument:xmlns:
data style:1.0

manifest

For elements and attribute contained in the package manifest.

urn:oasis:names:tc:opendocument:xmlns:
manifest:1.0

Table 2 lists the namespaces that are defined by the OpenDocument format, but contain elements and attributes whose semantics are compatible to elements and attributes from other specifications.

Table 2: XML Namespaces defined by the OpenDocument schema that include elements and attributes that are compatible to elements and attributes of other standards.

Prefix

Description

Namespace

fo

For attributes that are compatible to attributes defined in [XSL].

urn:oasis:names:tc:opendocument:xmlns:
xsl-fo-compatible:1.0

svg

For elements and attributes that are compatible to elements or attributes defined in [SVG].

urn:oasis:names:tc:opendocument:xmlns:
svg-compatible:1.0

smil

For attributes that are compatible to attributes defined in [SMIL20].

urn:oasis:names:tc:opendocument:xmlns:
smil-compatible:1.0

Table 3 lists the namespaces that are imported into the OpenDocument format and their default prefixes.

Table 3: XML Namespaces used by the OpenDocument schema

Prefix

Description

Namespace

dc

The Dublin Core Namespace (see [DCMI]).

http://purl.org/dc/elements/1.1/

xlink

The XLink namespace (see [XLink]).

http://www.w3.org/1999/xlink

math

MathML Namespace (see [MathML])

http://www.w3.org/1998/Math/MathML

xforms

The XForms namespace (see [XForms]).

http://www.w3.org/2002/xforms

1.4 Relax-NG Schema

The normative XML Schema for the OpenDocument format is embedded within this specification. It can be obtained from the specification document by concatenating all schema fragments contained in chapters 1 to 16. All schema fragments have a gray background color and line numbers.

The schema language used within this specification is Relax-NG (see [RNG]). The attribute default value feature specified in [RNG-Compat] is used to provide attribute default values.

The schema provided in this specification permits arbitrary content within meta information elements and formatting properties elements as described in section 1.5. Appendix A contains a schema that restricts the content within these elements to the attributes and elements defined in this specification.

Prefix for the normative Relax-NG schema:

<?xml version="1.0" encoding="UTF-8"?>

<!--

OASIS OpenDocument v1.1

Committee Specification1, 19 Oct 2006

Relax-NG Schema


$Id$


© 2002-2005 OASIS Open

© 1999-2005 Sun Microsystems, Inc.

-->


<grammar

xmlns="http://relaxng.org/ns/structure/1.0"

xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"


datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"


xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"

xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"

xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config: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:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"

xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"

xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"

xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"

xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"

xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"

xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"

xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"


xmlns:dc="http://purl.org/dc/elements/1.1/"

xmlns:xlink="http://www.w3.org/1999/xlink"

xmlns:math="http://www.w3.org/1998/Math/MathML"

xmlns:xforms="http://www.w3.org/2002/xforms"


xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"

xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"

xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"

>

1.5 Document Processing and Conformance

Documents that conform to the OpenDocument specification may contain elements and attributes not specified within the OpenDocument schema. Such elements and attributes must not be part of a namespace that is defined within this specification and are called foreign elements and attributes.

Conforming applications either shall read documents that are valid against the OpenDocument schema if all foreign elements and attributes are removed before validation takes place, or shall write documents that are valid against the OpenDocument schema if all foreign elements and attributes are removed before validation takes place.

Conforming applications that read and write documents may preserve foreign elements and attributes.

In addition to this, conforming applications should preserve meta information and the content of styles. This means:

Foreign elements may have an office:process-content attribute attached that has the value true or false. If the attribute's value is true, or if the attribute does not exist, the element's content should be processed by conforming applications. Otherwise conforming applications should not process the element's content, but may only preserve its content. If the element's content should be processed, the document itself shall be valid against the OpenDocument schema if the unknown element is replaced with its content only.

Conforming applications shall read documents containing processing instructions and should preserve them.

There are no rules regarding the elements and attributes that actually have to be supported by conforming applications, except that applications should not use foreign elements and attributes for features defined in the OpenDocument schema. See also appendix D.

<define name="office-process-content">

<optional>

<attribute name="office:process-content" a:defaultValue="true">

<ref name="boolean"/>

</attribute>

</optional>

</define>

1.6 White-Space Processing and EOL Handling

In conformance with the W3C XML specification [XML1.0], optional white-space characters that are contained in elements that have element content (in other words that must contain elements only but not text) are ignored. This applies to the following white-space and end-of-line (EOL) [UNICODE] characters:

For any other element, white-spaces are preserved by default. Unless otherwise stated, there is no special processing for any of the four white-space characters. For some elements, different white-space processing may take place, for example the paragraph element.

The XML specification also requires that any of the four white-space characters that is contained in an attribute value is normalized to a SPACE character.

One of the following characters may be used to represent line ends:

Conforming to the XML specification, all the possible line ends are normalized to a single LINE FEED character.

As a consequence of the white-space and EOL processing rules, any CARRIAGE RETURN characters that are contained either in the text content of an element or in an attribute value must be encoded by the character entity &#x0D;. The same applies to the HORIZONTAL TABULATION and LINE FEED characters if they are contained in an attribute value.

1.7 MIME Types and File Name Extensions

Appendix C contains a list of MIME types and file name extensions to be used for office documents that conform to this specification and that are contained in a package (see section 2.1). This MIME types and extensions either have been registered following the procedures described in [RFC2048], or a registration is in progress.

Office documents that conform to this specification but are not contained in a package should use the MIME type text/xml.

Only MIME types and extensions that have been registered according to [RFC2048] should used for office documents that conform to this specification. The MIME types and extensions listed in appendix C should be used where appropriate.

2 Document Structure

This chapter introduces the structure of the OpenDocument format. The chapter contains the following sections:

In the OpenDocument format, each structural component is represented by an element, with associated attributes. The structure of a document in OpenDocument format applies to all document types. There is no difference between a text document, a spreadsheet or a drawing, apart from the content. Also, all document types may contain different styles. Document content that is common to all document types can be exchanged from one type of document to another.

2.1 Document Roots

A document root element is the primary element of a document inOpenDocument format. It contains the entire document. All types of documents, for example, text documents, spreadsheets, and drawing documents use the same types of document root elements.

The OpenDocument format supports the following two ways of document representation:

There are four types of subdocuments, each with different root elements. Additionally, the single XML document has its own root element, for a total of five different supported root elements. The root elements are summarized in the following table:

Root Element

Subdocument Content

Subdoc. Name in Package

<office:document>

Complete office document in a single XML document.

n/a

<office:document-content>

Document content and automatic styles used in the content.

content.xml

<office:document-styles>

Styles used in the document content and automatic styles used in the styles themselves.

styles.xml

<office:document-meta>

Document meta information, such as the author or the time of the last save action.

meta.xml

<office:document-settings>

Application-specific settings, such as the window size or printer information.

settings.xml

The definitions of the root elements described in the table above are analogous to the definition of <office:document>, except that the child element specification is suitably restricted.

<start>

<choice>

<ref name="office-document"/>

<ref name="office-document-content"/>

<ref name="office-document-styles"/>

<ref name="office-document-meta"/>

<ref name="office-document-settings"/>

</choice>

</start>

2.1.1 Document Root Element Content Models

The content models of the five root elements is summarized in the following table. Note that <office:document> may contain all supported top-level elements. None of the four subdocument root elements contain the complete data, but four combined do.

Root Element

meta­data

app. sett.

script

font decls

style

auto style

mast style

body

<office:document>

X

X

X

X

X

X

X

X

<office:document-content>



X

X


X


X

<office:document-styles>




X

X

X

X


<office:document-meta>

X








<office:document-settings>


X







The <office:document> root contains a complete document:

<define name="office-document">

<element name="office:document">

<ref name="office-document-attrs"/>

<ref name="office-document-common-attrs"/>

<ref name="office-meta"/>

<ref name="office-settings"/>

<ref name="office-scripts"/>

<ref name="office-font-face-decls"/>

<ref name="office-styles"/>

<ref name="office-automatic-styles"/>

<ref name="office-master-styles"/>

<ref name="office-body"/>

</element>

</define>

The <office:document-content> root contains only the document content, along with the automatic styles needed for the document content:

<define name="office-document-content">

<element name="office:document-content">

<ref name="office-document-common-attrs"/>

<ref name="office-scripts"/>

<ref name="office-font-face-decls"/>

<ref name="office-automatic-styles"/>

<ref name="office-body"/>

</element>

</define>

The <office:document-styles> root contains all named styles of a document, along with the automatic styles needed for the named styles:

<define name="office-document-styles">

<element name="office:document-styles">

<ref name="office-document-common-attrs"/>

<ref name="office-font-face-decls"/>

<ref name="office-styles"/>

<ref name="office-automatic-styles"/>

<ref name="office-master-styles"/>

</element>

</define>

The <office:document-meta> root contains the meta information about a document.

<define name="office-document-meta">

<element name="office:document-meta">

<ref name="office-document-common-attrs"/>

<ref name="office-meta"/>

</element>

</define>

The <office:document-settings> root contains application specific settings to be applied when processing this document.

<define name="office-document-settings">

<element name="office:document-settings">

<ref name="office-document-common-attrs"/>

<ref name="office-settings"/>

</element>

</define>

2.1.2 Document Root Attributes

Version

All root elements take an office:version attribute, which indicates which version of this specification it complies with. The version number is in the format revision.version. If the file has a version known to an XML processor, it may validate the document. Otherwise, it is optional to validate the document, but the document must be well formed.

<define name="office-document-common-attrs" combine="interleave">

<optional>

<attribute name="office:version">

<ref name="string"/>

</attribute>

</optional>

</define>

MIME Type

The <office:document> element takes an office:mimetype attribute, which indicates the type of document (text, spreadsheet etc.). This attribute is especially important for flat XML files, where this is the only way the type of document can be detected (in a package, the MIME type is also present in a separate file, see section 17.4). Its values are the MIME types that are used for the packaged variant of office documents (see section 1.7).

<define name="office-document-attrs" combine="interleave">

<attribute name="office:mimetype">

<ref name="string"/>

</attribute>

</define>

2.2 Document Metadata

Metadata is general information about a document. In the OpenDocument format, all of the metadata elements are contained in an <office:meta> element, usually located at start of the document. Metadata elements may be omitted or occur multiple times. It is application-specific how to update multiple instances of the same elements.

<define name="office-meta">

<optional>

<element name="office:meta">

<ref name="office-meta-content"/>

</element>

</optional>

</define>


<define name="office-meta-content">

<ref name="anyElements"/>

</define>


<define name="office-meta-content-strict">

<zeroOrMore>

<ref name="office-meta-data"/>

</zeroOrMore>

</define>

2.2.1 Pre-Defined vs. Custom Metadata

In the OpenDocument schema the metadata is comprised of pre-defined metadata elements, user defined metadata, as well as custom metadata elements. The pre-defined metadata elements have defined semantics. They should be processed and updated by editing applications. They can be referenced from within the document through the use of suitable text fields.

User-defined metadata is a more generic mechanism which specifies a triplet of name, type, and value. Supporting applications can present these value to the user, making use of the supplied data type. The user-defined metadata can be referenced from within the document through the use of suitable text fields.

Custom metadata are arbitrary elements inside <office:meta>. Since their semantics is not defined in this specification, conforming applications in general cannot process or display this data. Applications should preserve this data when editing the document.

2.2.2 Sample Metadata

Example: Sample metadata of a document in OpenDocument format

<office:meta>

<dc:title>Title of the document</dc:title>

<dc:description>Description/Comment for the document</dc:description>

<meta:initial-creator>User Name</meta:initial-creator>

<meta:creation-date>1999-10-18T12:34:56</meta:creation-date>

<dc:creator>User Name</dc:creator>

<dc:date>1999-10-19T15:16:17</dc:date>

<meta:printed-by>User Name</meta:printed-by>

<meta:print-date>1999-10-20T16:17:18</meta:print-date>

<dc:subject>Description of the document</dc:subject>

<meta:editing-duration>PT5H10M10S</meta:editing-duration>

<meta:keyword>First keyword</meta:keyword>

<meta:keyword>Second keyword</meta:keyword>

<meta:keyword>Third keyword</meta:keyword>

<meta:template xlink:type="simple"

xlink:href="file:///c|/office52/share/template/german/finance/budget.vor"

xlink:title="Template name"

meta:date="1999-10-15T10:11:12" />

<meta:auto-reload

xlink:type="simple"

xlink:href="file:///..."

meta:delay="P60S" />

<dc:language>de-DE</dc:language>

<meta:user-defined meta:name="Field 1"

meta:value-type="string">Value 1</meta:user-defined>

<meta:user-defined meta:name="Field 2"

meta:value-type="float">1.234</meta:user-defined>

</office:meta>

2.3 Body Element and Document Types

The document body contains an element to indicate which type of content this document contains. Currently supported document types are:

All document types share the same content elements, but different document types place different restrictions on which elements may occur, and in what combinations. The document content is typically framed by a prelude and epilogue, which contain additional information for a specific type of document, like form data or variable declarations.

<define name="office-body">

<element name="office:body">

<ref name="office-body-content"/>

</element>

</define>

2.3.1 Text Documents

The content of text documents mainly consists of a sequence containing any number of paragraphs, tables, indices, text frames, text sections, and graphical elements. Additionally, a text document may contain forms, change tracking information and variable declarations. Each of these is defined in the document prelude, and may be referenced from the document content.

<define name="office-body-content" combine="choice">

<element name="office:text">

<ref name="office-text-attlist"/>

<ref name="office-text-content-prelude"/>

<zeroOrMore>

<ref name="office-text-content-main"/>

</zeroOrMore>

<ref name="office-text-content-epilogue"/>

</element>

</define>

Text Document Content Model

The text document prelude contains the document's form data, change tracking information, and variable declarations. To allow office applications to implement functionality that usually is available in spreadsheets for text documents, it may also contain elements that implement enhanced table features. See also section 2.3.4.

<define name="office-text-content-prelude">

<ref name="office-forms"/>

<ref name="text-tracked-changes"/>

<ref name="text-decls"/>

<ref name="table-decls"/>

</define>

The main document content contains any sequence of text content elements, which includes paragraphs (and headings), text sections (and indices), tables, and graphical shapes. As an alternative, a text document may contain of a single page sequence.

It is not required that a text document contains a paragraph. A text document may consist of a sequence frames only.

<define name="office-text-content-main">

<choice>

<zeroOrMore>

<ref name="text-content"/>

</zeroOrMore>

<group>

<ref name="text-page-sequence"/>

<zeroOrMore>

<choice>

<ref name="draw-a"/>

<ref name="shape"/>

</choice>

</zeroOrMore>

</group>

</choice>

</define>


<define name="text-content">

<choice>

<ref name="text-h"/>

<ref name="text-p"/>

<ref name="text-list"/>

<ref name="text-numbered-paragraph"/>

<ref name="table-table"/>

<ref name="draw-a"/>

<ref name="text-section"/>

<ref name="text-soft-page-break"/>

<ref name="text-table-of-content"/>

<ref name="text-illustration-index"/>

<ref name="text-table-index"/>

<ref name="text-object-index"/>

<ref name="text-user-index"/>

<ref name="text-alphabetical-index"/>

<ref name="text-bibliography"/>

<ref name="shape"/>

<ref name="change-marks"/>

</choice>

</define>

There are no text documents specific epilogue elements, but the epilogue may contain elements that implement enhanced table features. See also section 2.3.4.

<define name="office-text-content-epilogue">

<ref name="table-functions"/>

</define>

Global Text Documents

There is a common use case for large documents to be edited in separate entities, such that there is a 'global' document, containing several linked constituent subdocuments. This can be implemented by using linked text sections (see section 4.4). To facilitate an editing application adapting the user interface to better support the notion of 'global' document with constituent parts (as opposed to a document with arbitrary linked content), the text:global flag can be used. If set to true, it informs applications that linked sections in this document have part-of semantics. The actual XML representation of the sections does not change.

<define name="office-text-attlist" combine="interleave">

<optional>

<attribute name="text:global" a:defaultValue="false">

<ref name="boolean"/>

</attribute>

</optional>

</define>

Use Soft Page Breaks

The text:use-soft-page-breaks attribute specifies whether the document contains soft page breaks.

A soft page break is a page break that a has been included by a page oriented processor at a position where the document itself does not include a page break (e.g. by using the fo:break-before and fo:break-after formatting properties described in section 15.5.2).

Soft page breaks are specified by the <text:soft-page-break> elements described in sections 4.7 and 5.1.1:Soft Page breaks.

The use of the <text:soft-page-break> elements is always optional. An application generating the format may include the element if it has computed a paginated layout. A consuming application may handle the element while computing the layout, but it shall not depend on its existence. Soft page breaks are only supported within text documents.

A generating application that stores soft page breaks shall indicate this by setting the text:use-page-breaks attribute to true. A generating application that does not store soft page breaks shall indicate that by omitting this attribute, or by setting it to false.

An application that does not support pagination and soft page-breaks, that modifies an OpenDocument file, which includes soft page-breaks, shall at least set the text:use-page-breaks attribute to false (or remove it). It should also remove the text:soft-page-break elements from the document but is not required to do so.

An application that computes a paginated layout of a document should provide a facility to turn on export of soft page breaks for the purposes of consistent page breaks and for proper conversion to digital talking book formats (such as [DAISY]).

For <text:soft-page-break> elements that appear within table rows, the maximum number of <text:soft-page-break> elements that appear within the single table cells determines the number of page breaks that appear within the table row. The <text:soft-page-break> elements contained in each cell determine the positions where these page breaks appear within the cell content.

Similarly, <text:soft-page-break> elements that appear within text boxes and other content displayed outside the text flow, do not start a new page, but only indicate where the text-box's content breaks between two pages.

<define name="office-text-attlist" combine="interleave">

<optional>

<attribute name="text:use-soft-page-breaks" a:defaultValue="false">

<ref name="boolean"/>

</attribute>

</optional>

</define>

2.3.2 Drawing Documents

The content of drawing document consists of a sequence of draw pages.

<define name="office-body-content" combine="choice">

<element name="office:drawing">

<ref name="office-drawing-attlist"/>

<ref name="office-drawing-content-prelude"/>

<ref name="office-drawing-content-main"/>

<ref name="office-drawing-content-epilogue"/>

</element>

</define>


<define name="office-drawing-attlist">

<empty/>

</define>

Drawing Document Content Model

The drawing document prelude may contain text declarations only. To allow office applications to implement functionality that usually is available in spreadsheets for drawing documents, it may also contain elements that implement enhanced table features. See also section 2.3.4.

<define name="office-drawing-content-prelude">

<ref name="text-decls"/>

<ref name="table-decls"/>

</define>

The main document content contains a sequence of draw pages.

<define name="office-drawing-content-main">

<zeroOrMore>

<ref name="draw-page"/>

</zeroOrMore>

</define>

There are no drawing documents specific epilogue elements, but the epilogue may contain elements that implement enhanced table features. See also section 2.3.4.

<define name="office-drawing-content-epilogue">

<ref name="table-functions"/>

</define>

2.3.3 Presentation Documents

The content of presentation document consists of a sequence of draw pages.

<define name="office-body-content" combine="choice">

<element name="office:presentation">

<ref name="office-presentation-attlist"/>

<ref name="office-presentation-content-prelude"/>

<ref name="office-presentation-content-main"/>

<ref name="office-presentation-content-epilogue"/>

</element>

</define>


<define name="office-presentation-attlist">

<empty/>

</define>

Presentation Document Content Model

The presentation document prelude equals the one of a drawing document, but may contain some additional declarations. See also section 2.3.2.

<define name="office-presentation-content-prelude">

<ref name="text-decls"/>

<ref name="table-decls"/>

<ref name="presentation-decls"/>

</define>

The main document content contains a sequence of draw pages.

<define name="office-presentation-content-main">

<zeroOrMore>

<ref name="draw-page"/>

</zeroOrMore>

</define>

The epilogue of presentation documents may contain presentation settings. Additionally, it may contain elements that implement enhanced table features. See also section 2.3.4.

<define name="office-presentation-content-epilogue">

<ref name="presentation-settings"/>

<ref name="table-functions"/>

</define>

2.3.4 Spreadsheet Documents

The content of spreadsheet documents mainly consists of a sequence of tables. Additionally, a spreadsheet document may contain forms, change tracking information and various kinds of declarations that simplify the usage of spreadsheet tables and their analysis. Each of these are contained in either the document prelude, or the document epilogue.

<define name="office-body-content" combine="choice">

<element name="office:spreadsheet">

<ref name="office-spreadsheet-attlist"/>

<ref name="office-spreadsheet-content-prelude"/>

<ref name="office-spreadsheet-content-main"/>

<ref name="office-spreadsheet-content-epilogue"/>

</element>

</define>

Spreadsheet Document Content Model

The spreadsheet document prelude contains the document's form data, change tracking information, calculation setting for formulas, validation rules for cell content and declarations for label ranges.

<define name="office-spreadsheet-content-prelude">

<optional>

<ref name="table-tracked-changes"/>

</optional>

<ref name="text-decls"/>

<ref name="table-decls"/>

</define>


<define name="table-decls">

<optional>

<ref name="table-calculation-settings"/>

</optional>

<optional>

<ref name="table-content-validations"/>

</optional>

<optional>

<ref name="table-label-ranges"/>

</optional>

</define>

The main document is a list of tables.

<define name="office-spreadsheet-content-main">

<zeroOrMore>

<ref name="table-table"/>

</zeroOrMore>

</define>

The epilogue of spreadsheet documents contains declarations for named expressions, database ranges, data pilot tables, consolidation operations and DDE links.

<define name="office-spreadsheet-content-epilogue">

<ref name="table-functions"/>

</define>


<define name="table-functions">

<optional>

<ref name="table-named-expressions"/>

</optional>

<optional>

<ref name="table-database-ranges"/>

</optional>

<optional>

<ref name="table-data-pilot-tables"/>

</optional>

<optional>

<ref name="table-consolidation"/>

</optional>

<optional>

<ref name="table-dde-links"/>

</optional>

</define>

2.3.5 Chart Documents

The content of chart documents mainly consists of a chart element.

<define name="office-body-content" combine="choice">

<element name="office:chart">

<ref name="office-chart-attlist"/>

<ref name="office-chart-content-prelude"/>

<ref name="office-chart-content-main"/>

<ref name="office-chart-content-epilogue"/>

</element>

</define>


<define name="office-chart-attlist">

<empty/>

</define>

Chart Document Content Model

To allow office applications to implement functionality that usually is available in spreadsheets for the table that may be contained in a chart, the chart document prelude may contain elements that implement enhanced table features. See also section 2.3.4.

<define name="office-chart-content-prelude">

<ref name="text-decls"/>

<ref name="table-decls"/>

</define>

The main document is a chart element only.

<define name="office-chart-content-main">

<ref name="chart-chart"/>

</define>

There are no chart documents specific epilogue elements, but the epilogue may contain elements that implement enhanced table features. See also section 2.3.4.

<define name="office-chart-content-epilogue">

<ref name="table-functions"/>

</define>

2.3.6 Image Documents

The content of an image document is a frame element only. The frame element must contain a single image element.

<define name="office-body-content" combine="choice">

<element name="office:image">

<ref name="office-image-attlist"/>

<ref name="office-image-content-prelude"/>

<ref name="office-image-content-main"/>

<ref name="office-image-content-epilogue"/>

</element>

</define>


<define name="office-image-attlist">

<empty/>

</define>

Image Document Content Model

The image document prelude is empty.

<define name="office-image-content-prelude">

<empty/>

</define>

The main document content contains a frame only.

<define name="office-image-content-main">

<ref name="draw-frame"/>

</define>

There are no image documents specific epilogue elements.

<define name="office-image-content-epilogue">

<empty/>

</define>

2.4 Application Settings

Application settings are contained in a <office:settings> element.

<define name="office-settings">

<optional>

<element name="office:settings">

<oneOrMore>

<ref name="config-config-item-set"/>

</oneOrMore>

</element>

</optional>

</define>

The settings for office applications may be divided into several categories each represented by a <config:config-item-set> element. For instance the following two categories may exist:

2.4.1 Sequence of Settings

The <config:config-item-set> element is a container element for all types of setting elements. The settings can be contained in the element is any order.

<define name="config-config-item-set">

<element name="config:config-item-set">

<ref name="config-config-item-set-attlist"/>

<ref name="config-items"/>

</element>

</define>


<define name="config-items">

<oneOrMore>

<choice>

<ref name="config-config-item"/>

<ref name="config-config-item-set"/>

<ref name="config-config-item-map-named"/>

<ref name="config-config-item-map-indexed"/>

</choice>

</oneOrMore>

</define>

Config Name

The config:name attribute identifies the name of the setting container. For top level <config:config-item-set> elements, that are elements that are direct children of the <office:settings> element, the name should be preceded by a namespace prefix that identifies the application the settings belong to.

<define name="config-config-item-set-attlist" combine="interleave">

<attribute name="config:name">

<ref name="string"/>

</attribute>

</define>

Example:

<office:settings>

<config:config-item-set xmlns:ooo="http://www.openoffice.org/...";

config:name="ooo:view-settings">

<config:config-item config:name="ViewAreaTop"

config:type="int">0</config:config-item>

</config:config-item-set>

</office:settings>

2.4.2 Base Settings

The <config:config-item> element contains all base settings. The value of the setting is stored in the element.

<define name="config-config-item">

<element name="config:config-item">

<ref name="config-config-item-attlist"/>

<text/>

</element>

</define>

Config Name

The config:name attribute identifies the name of the setting.

<define name="config-config-item-attlist" combine="interleave">

<attribute name="config:name">

<ref name="string"/>

</attribute>

</define>

Config Type

The config:type attribute identifies the data type of setting.

<define name="config-config-item-attlist" combine="interleave">

<attribute name="config:type">

<choice>

<value>boolean</value>

<value>short</value>

<value>int</value>

<value>long</value>

<value>double</value>

<value>string</value>

<value>datetime</value>

<value>base64Binary</value>

</choice>

</attribute>

</define>

2.4.3 Index Access of Sequences

The <config:config-item-map-indexed> element is a container element for sequences. The order specifies the index of the elements

<define name="config-config-item-map-indexed">

<element name="config:config-item-map-indexed">

<ref name="config-config-item-map-indexed-attlist"/>

<oneOrMore>

<ref name="config-config-item-map-entry"/>

</oneOrMore>

</element>

</define>

Config Name

The config:name attribute identifies the name of the setting sequence.

<define name="config-config-item-map-indexed-attlist" combine="interleave">

<attribute name="config:name">

<ref name="string"/>

</attribute>

</define>

2.4.4 Map Entry

The <config:config-item-map-entry> element represents an entry in an indexed or named settings sequence. It is a container element for all types of setting elements.

<define name="config-config-item-map-entry">

<element name="config:config-item-map-entry">

<ref name="config-config-item-map-entry-attlist"/>

<ref name="config-items"/>

</element>

</define>

Config Name

The config:name attribute identifies the name of the setting sequence.

<define name="config-config-item-map-entry-attlist" combine="interleave">

<optional>

<attribute name="config:name">

<ref name="string"/>

</attribute>

</optional>

</define>

2.4.5 Name Access of Sequences

The <config:config-item-map-named> element is a container element for sequences, where each setting in the sequence is identified by its name.

<define name="config-config-item-map-named">

<element name="config:config-item-map-named">

<ref name="config-config-item-map-named-attlist"/>

<oneOrMore>

<ref name="config-config-item-map-entry"/>

</oneOrMore>

</element>

</define>

Config Name

The config:name attribute identifies the name of the setting sequence.

<define name="config-config-item-map-named-attlist" combine="interleave">

<attribute name="config:name">

<ref name="string"/>

</attribute>

</define>

2.4.6 Cursor Position Setting

A common view setting for editing applications is the position where the text cursor was while saving the document. For WYSIWYG applications, this usually will be a position within a paragraph only. For applications that provide an XML based view of the document, the cursor position could be also between arbitrary elements, or even within tags.

To represent a text cursor position within a document, a processing instruction with PITarget opendocument (see §2.6 of [XML1.0]) should be used. The name of the cursor position processing instruction, cursor-position, shall follow the PITarget opendocument. The processing instruction may have arbitrary application specific attributes, for instance to connect the cursor position with a certain view of the document, where the views themselves are specified as application specific settings. The syntax for these attributes shall be the same as for attributes within XML start tags.

Where a text cursor position is not sufficient to recreate a document view, applications may use arbitrary document specific settings in addition to the cursor position processing instruction. They may also use arbitrary document specific settings if the cursor position is not a text cursor position, but for instance a selection of drawing objects.

Example: cursor position processing instruction

<text:p>This is<?opendocument cursor-position view-id="view1"?> an example.</text:p>

2.5 Scripts

A document may contain several scripts in different scripting languages. Each script is represented by a <office:script> element. All these script elements are contained in a single <office:scripts> element.

Scripts do not imply a scripting language or an object model. A script can for instance operate on the Document Object Model (DOM) composed from the XML representation of a document in OpenDocument format (see [DOM2]), or on an application specific API.

Scripts cannot modify a document while the document is loading. However, some events are called immediately after the document is loaded.

In addition to <office:script> elements, the <office:scripts> element may also contain an <office:event-listeners> element which contains the events assigned to the document itself. Examples for these are events called when the document is opened or closed. See section 12.4 for more information on the <office:event-listeners> element.

<define name="office-scripts">

<optional>

<element name="office:scripts">

<zeroOrMore>

<ref name="office-script"/>

</zeroOrMore>

<optional>

<ref name="office-event-listeners"/>

</optional>

</element>

</optional>

</define>

2.5.1 Script

The <office:script> element contains script language specific content. In most situations, the element contains the source code of the script, but it may also contain a compiled version of the script or a link to some external script code.

<define name="office-script">

<element name="office:script">

<ref name="office-script-attlist"/>

<mixed>

<ref name="anyElements"/>

</mixed>

</element>

</define>

Script Language

The attribute script:language specifies the language of the script by its name. Since script language names are application specific, the name should be preceded by a namespace prefix.

<define name="office-script-attlist">

<attribute name="script:language">

<ref name="string"/>

</attribute>

</define>

2.6 Font Face Declarations

A document in OpenDocument format may contain font face declarations. A font face declaration provides information about the fonts used by the author of a document, so that these fonts or fonts that are very close to these fonts may be located on other systems. See section 14.6 for details.

<define name="office-font-face-decls">

<optional>

<element name="office:font-face-decls">

<zeroOrMore>

<ref name="style-font-face"/>

</zeroOrMore>

</element>

</optional>

</define>

2.7 Styles

The OpenDocument format supports the following types of styles:

As far as the office application user is concerned, all types of styles are part of the document. They represent the output device-independent layout and formatting information that the author of a document has used to create or edit the document. The assumption is that the author of the document wants this formatting and layout information to be preserved when the document is reloaded or displayed on any device, because this is common practice for documents created by word processors.

This type of style information differs from [CSS2] or [XSLT] style sheets that are used to display a document. An additional style sheet for CSS, XSLT, and so on, is required to display a document in OpenDocument format on a certain device. This style sheet must take into account the styles in the document as well as the requirements and capabilities of the output device. The ideal case is that this style sheet depends on the output device only.

See section 14 for more information on styles.

2.7.1 Location of Styles

Common and automatic styles have the same XML representation, but they are contained within two distinct container elements, as follows:

<define name="office-styles">

<optional>

<element name="office:styles">

<interleave>

<ref name="styles"/>

<zeroOrMore>

<ref name="style-default-style"/>

</zeroOrMore>

<optional>

<ref name="text-outline-style"/>

</optional>

<zeroOrMore>

<ref name="text-notes-configuration"/>

</zeroOrMore>

<optional>

<ref name="text-bibliography-configuration"/>

</optional>

<optional>

<ref name="text-linenumbering-configuration"/>

</optional>

<zeroOrMore>

<ref name="draw-gradient"/>

</zeroOrMore>

<zeroOrMore>

<ref name="svg-linearGradient"/>

</zeroOrMore>

<zeroOrMore>

<ref name="svg-radialGradient"/>

</zeroOrMore>

<zeroOrMore>

<ref name="draw-hatch"/>

</zeroOrMore>

<zeroOrMore>

<ref name="draw-fill-image"/>

</zeroOrMore>

<zeroOrMore>

<ref name="draw-marker"/>

</zeroOrMore>

<zeroOrMore>

<ref name="draw-stroke-dash"/>

</zeroOrMore>

<zeroOrMore>

<ref name="draw-opacity"/>

</zeroOrMore>

<zeroOrMore>

<ref name="style-presentation-page-layout"/>

</zeroOrMore>

</interleave>

</element>

</optional>

</define>

<define name="office-automatic-styles">

<optional>

<element name="office:automatic-styles">

<interleave>

<ref name="styles"/>

<zeroOrMore>

<ref name="style-page-layout"/>

</zeroOrMore>

</interleave>

</element>

</optional>

</define>

<define name="office-master-styles">

<optional>

<element name="office:master-styles">

<interleave>

<zeroOrMore>

<ref name="style-master-page"/>

</zeroOrMore>

<optional>

<ref name="style-handout-master"/>

</optional>

<optional>

<ref name="draw-layer-set"/>

</optional>

</interleave>

</element>

</optional>

</define>


<define name="styles">

<interleave>

<zeroOrMore>

<ref name="style-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="text-list-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="number-number-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="number-currency-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="number-percentage-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="number-date-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="number-time-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="number-boolean-style"/>

</zeroOrMore>

<zeroOrMore>

<ref name="number-text-style"/>

</zeroOrMore>

</interleave>

</define>

The following examples illustrate the different types of OpenDocument styles.

Example: OpenDocument styles

<office:document ...>

<office:styles>

...

</office:styles>

<office:automatic-styles>

...

</office:automatic-styles>

<office:master-styles>

...

</office:master-styles>

</office:document>

2.8 Page Styles and Layout

The style and layout of the pages in a document is determined by:

A page layout describes the physical properties or geometry of a page, for example, page size, margins, header height, and footer height.

A master page is a template for pages in a document. It contains a reference to a page layout which specifies the physical properties of the page and can also contain static content that is displayed on all pages in the document that use the master page. Examples of static content are headers, footers, or background graphics.

If a text or spreadsheet document is displayed in a paged layout, the master pages are instantiated to generate a sequence of pages containing the document content. When a master page is instantiated, an empty page is generated with the properties of the page master and the static content of the master page. The body of the page is then filled with content. If multiple pages in a document use the same master page, the master page can be instantiated several times within the document.

In text and spreadsheet documents, a master page can be assigned to paragraph and table styles using a style:master-page-name attribute. Each time the paragraph or table style is applied to text, a page break is inserted before the paragraph or table. The page that starts at the page break position uses the specified master page.

In drawings and presentations, master pages can be assigned to drawing pages using a style:parent-style-name attribute.

Note: The OpenDocument paging methodology differs significantly from the methodology used in [XSL]. In XSL, headers and footers are contained within page sequences that also contain the document content. In the OpenDocument format, headers and footers are contained in page styles. With either approach, the content of headers and footers can be changed or omitted without affecting the document content.

Page layouts are described in section 14.3. Master pages are described in section 14.4.

3 Metadata Elements

The metadata elements borrow heavily upon the metadata standards developed by the Dublin Core Metadata Initiative (http://www.dublincore.org). Metadata elements drawn directly from the Dublin Core work use its namespace prefix (see section 1.3).

3.1 Pre-Defined Metadata Elements

There is a set of pre-defined metadata elements which should be processed and updated by the applications. Metadata elements may be omitted or occur multiple times. It is application-specific how to update multiple instances of the same elements.

3.1.1 Generator

The <meta:generator> element contains a string that identifies the application or tool that was used to create or last modify the XML document. This string should match the definition for user-agents in the HTTP protocol a specified in section 14.43 of [RFC2616]. The generator string should allow product versions to differ between all released versions of a user agent, for instance by including build ids or patch level information.

Conforming applications may use the generator string to work around bugs that exist or existed in certain applications, but shall not deliberately implement a different behavior depending on a certain generator string.

If the application that created the document could not provide an identifier string, the application does not export this element. If another application modifies the document and it cannot provide a unique identifier, it shall not export the original identifier belonging to the application that created the document.

<define name="office-meta-data" combine="choice">

<element name="meta:generator">

<ref name="string"/>

</element>

</define>

3.1.2 Title

The <dc:title> element specifies the title of the document.

<define name="office-meta-data" combine="choice">

<element name="dc:title">

<ref name="string"/>

</element>

</define>

3.1.3 Description

The <dc:description> element contains a brief description of the document.

<define name="office-meta-data" combine="choice">

<element name="dc:description">

<ref name="string"/>

</element>

</define>

3.1.4 Subject

The <dc:subject> element specifies the subject of the document.

<define name="office-meta-data" combine="choice">

<element name="dc:subject">

<ref name="string"/>

</element>

</define>

3.1.5 Keywords

The <meta:keyword> element contains a keyword pertaining to the document. The metadata can contain any number of <meta:keyword> elements, each element specifying one keyword.

<define name="office-meta-data" combine="choice">

<element name="meta:keyword">

<ref name="string"/>

</element>

</define>

3.1.6 Initial Creator

The <meta:initial-creator> element specifies the name of the person who created the document initially.

<define name="office-meta-data" combine="choice">

<element name="meta:initial-creator">

<ref name="string"/>

</element>

</define>

3.1.7 Creator

The <dc:creator> element specifies the name of the person who last modified the document. The name of this element was chosen for compatibility with the Dublin Core, but this definition of "creator" used here differs from Dublin Core, which defines creator as "An entity primarily responsible for making the content of the resource." In OpenDocument terminology, the last person to modify the document is primarily responsible for making the content of the document.

<define name="office-meta-data" combine="choice">

<ref name="dc-creator"/>

</define>

<define name="dc-creator">

<element name="dc:creator">

<ref name="string"/>

</element>

</define>

3.1.8 Printed By

The <meta:printed-by> element specifies the name of the last person who printed the document.

<define name="office-meta-data" combine="choice">

<element name="meta:printed-by">

<ref name="string"/>

</element>

</define>

3.1.9 Creation Date and Time

The <meta:creation-date> element specifies the date and time when the document was created initially.

To conform with [xmlschema-2], the date and time format is YYYY-MM-DDThh:mm:ss.

<define name="office-meta-data" combine="choice">

<element name="meta:creation-date">

<ref name="dateTime"/>

</element>

</define>

3.1.10 Modification Date and Time

The <dc:date> element specifies the date and time when the document was last modified.

To conform with [xmlschema-2], the date and time format is YYYY-MM-DDThh:mm:ss.

The name of this element was chosen for compatibility with the Dublin Core.

<define name="office-meta-data" combine="choice">

<ref name="dc-date"/>

</define>

<define name="dc-date">

<element name="dc:date">

<ref name="dateTime"/>

</element>

</define>

3.1.11 Print Date and Time

The <meta:print-date> element specifies the date and time when the document was last printed.

To conform with [xmlschema-2], the date and time format is YYYY-MM-DDThh:mm:ss.

<define name="office-meta-data" combine="choice">

<element name="meta:print-date">

<ref name="dateTime"/>

</element>

</define>

3.1.12 Document Template

The <meta:template> element contains a URL for the document template that was used to create the document. The URL is specified as an XLink.

This element conforms to the XLink Specification. See [XLink].

The attributes that may be associated with the <meta:template> element are:

Template Location

An xlink:href attribute specifies the location of the document template.

Template Title

The xlink:title attribute specifies the name of the document template.

Template Modification Date and Time

The meta:date attribute specifies the date and time when the template was last modified, prior to being used to create the current document.

To conform with [xmlschema-2], the date and time format is YYYY-MM-DDThh:mm:ss.

<define name="office-meta-data" combine="choice">

<element name="meta:template">

<attribute name="xlink:href">

<ref name="anyURI"/>

</attribute>

<optional>

<attribute name="xlink:type" a:defaultValue="simple">

<value>simple</value>

</attribute>

</optional>

<optional>

<attribute name="xlink:actuate" a:defaultValue="onRequest">

<value>onRequest</value>

</attribute>

</optional>

<optional>

<attribute name="xlink:title">

<ref name="string"/>

</attribute>

</optional>

<optional>

<attribute name="meta:date">

<ref name="dateTime"/>

</attribute>

</optional>

</element>

</define>

3.1.13 Automatic Reload

The <meta:auto-reload> element specifies whether a document is reloaded or replaced by another document after a certain period of time has elapsed.

The attributes that may be associated with the <meta:auto-reload> element are:

Reload URL

If a loaded document should be replaced by another document after a certain period of time, the <meta:auto-reload> element is presented as an XLink. An xlink:href attribute identifies the URL of the replacement document.

Reload Delay

The meta:delay attribute specifies the reload delay.

To conform with the duration data type of [xmlschema-2], the format of the value of this attribute is PnYnMnDTnHnMnS. See §3.2.6 of [xmlschema-2] for more detailed information on this duration format.

<define name="office-meta-data" combine="choice">

<element name="meta:auto-reload">

<optional>

<attribute name="xlink:type" a:defaultValue="simple">

<value>simple</value>

</attribute>

</optional>

<optional>

<attribute name="xlink:show" a:defaultValue="replace">

<value>replace</value>

</attribute>

</optional>

<optional>

<attribute name="xlink:actuate" a:defaultValue="onLoad">

<value>onLoad</value>

</attribute>

</optional>

<optional>

<attribute name="xlink:href">

<ref name="anyURI"/>

</attribute>

</optional>

<optional>

<attribute name="meta:delay">

<ref name="duration"/>

</attribute>

</optional>

</element>

</define>

3.1.14 Hyperlink Behavior

The <meta:hyperlink-behaviour> element specifies the default behavior for hyperlinks in the document.

The only attribute that may be associated with the <meta:hyperlink-behaviour> element is:

Target Frame

The meta:target-frame-name attribute specifies the name of the default target frame in which to display a document referenced by a hyperlink.

This attribute can have one of the following values:

To conform with the XLink Specification, an additional xlink:show attribute is attached to the <meta:hyperlink-behaviour> element. If the value of the meta:target-frame-name attribute is _blank, the xlink:show attribute value is new. If the value of the meta:target-frame-name attribute is any of the other value options, the value of the xlink:show attribute is replace.

<define name="office-meta-data" combine="choice">

<element name="meta:hyperlink-behaviour">

<optional>

<attribute name="office:target-frame-name">

<ref name="targetFrameName"/>

</attribute>

</optional>

<optional>

<attribute name="xlink:show">

<choice>

<value>new</value>

<value>replace</value>

</choice>

</attribute>

</optional>

</element>

</define>

3.1.15 Language

The <dc:language> element specifies the default language of the document.

The manner in which the language is represented is similar to the language tag described in [RFC3066]. It consists of a two or three letter Language Code taken from the ISO 639 standard optionally followed by a hyphen (-) and a two-letter Country Code taken from the ISO 3166 standard.

<define name="office-meta-data" combine="choice">

<element name="dc:language">

<ref name="language"/>

</element>

</define>

3.1.16 Editing Cycles

The <meta:editing-cycles> element specifies the number of editing cycles the document has been through.

The value of this element is incremented every time the document is saved. The element contains the number of editing cycles as text.

<define name="office-meta-data" combine="choice">

<element name="meta:editing-cycles">

<ref name="nonNegativeInteger"/>

</element>

</define>

3.1.17 Editing Duration

The <meta:editing-duration> element specifies the total time spent editing the document.

The duration is represented in the duration data type of [xmlschema-2], that is PnYnMnDTnHnMnS. See §3.2.6 of [xmlschema-2] for more detailed information on this duration format.

<define name="office-meta-data" combine="choice">

<element name="meta:editing-duration">

<ref name="duration"/>

</element>

</define>

3.1.18 Document Statistics

The <meta:document-statistic> element specifies the statistics of the document, for example, the page count, word count, and so on. The statistics are specified as attributes of the <meta:document-statistic> element and the statistics that are exported with the document depend on the document type and the application used to create the document.

Document Type

Document Statistics Attributes

Text

meta:page-count
meta:table-count
meta:draw-count
meta:image-count
meta:object-count
meta:ole-object-count
meta:paragraph-count

meta:word-count
meta:character-count
meta:row-count
meta:frame-count
meta:sentence-count
meta:syllable-count
meta:non-whitespace-character-count

Spreadsheet

meta:page-count
meta:table-count
meta:image-count
meta:cell-count
meta:object-count

Graphic

meta:page-count
meta:image-count
meta:object-count

<define name="office-meta-data" combine="choice">

<element name="meta:document-statistic">

<optional>

<attribute name="meta:page-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:table-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:draw-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:image-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:ole-object-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:object-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:paragraph-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:word-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:character-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="frame-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="sentence-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="syllable-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="non-whitespace-character-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>

<attribute name="meta:row-count">

<ref name="nonNegativeInteger"/>

</attribute>

</optional>

<optional>