OpenDocument technical specification: Difference between revisions

Content deleted Content added
Versions detection: simplified the section
Line 329:
 
==Versions detection==
To indicate which version of the OpenDocument specification a file complies with, all root elements take an <code>office:version</code> attribute. The version number is (in the format ''revision.version'', (e.g.such as <code>office:version="1.1"). The <code>office:version</code>), attributewhich identifies the version of ODF specification that defined the associated element, its schema, its complete content, and its interpretation.
 
===ODF 1.0/1.1===
It is not mandatory to use <code>office:version</code> attribute in ODF 1.0 and ODF 1.1 files, so when an element has office:version omitted, the element is based on ODF 1.0 or 1.1. 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. It is not mandatory to use <code>office:version</code> attribute in ODF 1.0 and ODF 1.1 files.
 
===ODF 1.2 and newer===
The <code>office:version</code> attribute shall be present in each and every <office:document>, <office:document-content>, <office:document-styles>, <office:document-meta>, and <office:document-settings> element in the XML documents that comprise an OpenDocument 1.2 or newer document. The value of the office:version attribute shall bereflect "1.2"the OpenDocument version.
 
When an element has office:version="1.1" the element and its content are based on the OpenDocument v1.1 specification. For office:version="1.0" the element and its content are based on the OpenDocument v1.0 specification. When an element has office:version omitted, the element is based on a version of the OpenDocument specification earlier than v1.2. In these cases and in the case of values other than "1.2", the elements do not comprise an OpenDocument 1.2 document.<ref>{{cite web |url=http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1417682_253892949 |title=office:version attribute - OpenDocument Version 1.2, Part 1, 29 September 2011 |accessdate=2012-12-05}}</ref>
 
==Conformance==