Synopsis of XML files stored in the archives supported by OpenTBS.
Version 2010-01-18

Extensions:  odt, odg, ods, odf, odp, docx, xlsx and pptx

This file is uncomplete, feel free to send your own comments to:
  http://www.tinybutstrong.com/onlyyou.html

=================================
OpenOffice Writer Document (.ODT)
=================================

All simple quotes "'" in texts are coded with "&apos;" but they are automatically replaced by the OpenTBS plugin.

File: 'content.xml':
-----------------------

<office:document-content>
	...
  <office:body>
  	<office:text>
  		<text:section text:style-name="Sect1" text:name="Section1">
  			<text:p text:style-name="Standard">
  				Normal new lines are made new paragraphs <text:p>...</text:p>
  				Simple new lines are made with <text:line-break/>
  				Page breaks are made with a new paragraphe having a style which has the attribute fo:break-before="page". 
  				Local styles (bold, color,...) are made with <text:span text:style-name="T1">...</text:span>
  				Images:
					<draw:frame draw:style-name="fr1" draw:name="images1" text:anchor-type="paragraph" svg:width="0.847cm" svg:height="0.847cm" draw:z-index="0">
						<draw:image xlink:href="Pictures/100000000000002000000020A0D29467.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
					</draw:frame>
  			</text:p>
  		</text:section>
  	</office:text>
  </office:body>
</office:document-content>

Table:
-------
<table:table>
	<table:table-column ... />
	<table:table-row>
		<table:table-cell> ... </table:table-cell>
		<table:table-cell> ... </table:table-cell>
		...
	</table:table-row>
</table:table>


=================================
OpenOffice Calc Spreadsheet (.ODS)
=================================

File: 'content.xml':

Same as table for ODT.

=================================
OpenOffice Draw Graphic (.ODG)
=================================

File: 'content.xml':

=================================
OpenOffice Math Formula (.ODF)
=================================

File: 'content.xml':

Any comment in the formula must be entered between text dilimitors which is the double quotes (").
Newlines are made with the keyword 'newline' outside the text delimitor. 

=====================================
OpenOffice Impress Presentation (.ODP)
=====================================

File: 'content.xml':

=================================
Ms Word 2007 Document (.DOCX)
=================================
File: 'word/document.xml':

<w:document>
	<w:body>

		<w:p> New paragraph
      <w:pPr> Parameters of the paragraph
        <w:rPr> Set of parameters for a Run
        </w:rPr>
      </w:pPr>
			<w:r> New run item. A run item is a set of content having common layout properties.
        <w:rPr> Set of parameters for a Run. Examples: <w:i/> is italic, <w:b/> is bold.
        </w:rPr>
				<w:t>Your text is here</w:t>
				Simple new lines are made with <w:br/>
				Page breaks are made with <w:br w:type="page"/>
			</w:r>
		</w:p> 

	</w:body>
</w:document>

-> What are attributes "w:rsidR" and "w:rsidRPr" for?
"w:rsidR" is a Revision ID. Each new user on a doc has a new id, 
and each of its modification is marked with its RsID.
 More info: http://blogs.msdn.com/brian_jones/archive/2006/12/11/what-s-up-with-all-those-rsids.aspx

Table in a document:
--------------------
<w:p>...</w:p>

<w:tbl>
	<w:tblPr></w:tblPr>
	<w:tblGrid></w:tblGrid>
	<w:tr>
		<w:tc> ... </w:tc>
		<w:tc> ... </w:tc>
		...
	</w:tr>
</w:tbl>

<w:p>...</w:p> 

=================================
Ms Excel 2007 SpreadSheet (.XLSX)
=================================

The contents of cells are saved in the files 'xl/worksheets/sheet1.xml', sheet2.xml, sheet3.xml...
sheet1, sheet2, sheet3 are not the displays name of the sheets but the internal name. It seems that
there is always a 'sheet1.xml' file.

All string values of cells are stored in the file 'xl/sharedStrings.xml'. The cells contains
in fact the index of the string in the sharedStrings.xml file. This separation will probably
make difficulties  to merge an Excel 2007 sheet. 

File: 'xl/workbook.xml'

File: 'xl/worksheets/sheet1.xml':
<worksheet>
	...
	<sheetData>
		<row r="2" spans="2:2" ht="90">
			A range of one row in wich several cells are defined
			<c r="B2" s="1" t="s">
				
				Definition of a cell:
				Attribute r is the adress if the cell in the sheet
				Attribute s is the style of the cell (the format). Styles are saved into the file 'xl/styles.xml' but I have not found the link yet.
				Attribute t is the type of data, by default it is numerical
				t="s" means that the displayed value is a string, the saved value is the index if the string taken in file sharedStrings.xml.
				<f>B13+B14</f> the formula. If there is no formula, this tag is absent.
				<v>0</v> the inner value without formating. If t="s" then the value is in fact the index of the string.
			</c>
		</row>
	</sheetData>
</worksheet>

File: 'xl/sharedStrings.xml'
<sst>
	<si>
		<t>value or text</t>
	</si>
</sst>

=======================================
Ms PowerPoint 2007 Presentation (.PPTX)
=======================================

Think to set all texts to "Tools\Language\No check". Otherwise some TBS fields can be splited by XML tags about the language and spell checking.

'ppt/slides/slide1.xml'

