 
 Good morning.
In the attempt to facilitate and automate some tasks in SoftMaker Office, I am already transforming the XML-code of the document-xml file, included in the *.tmdx archives to other formats.
Now I am about to automate the creation of new tables in TextMaker, i.e. the creation of a new document, containing a basic, initial table which may already contain some values and/or properties. For the time I concentrate on the tmdx-format (which is, more or less, OOXML) and will not invest time in ODF.
The Question to a larger public than that of the German speaking SoftMaker Forum (for a change): Does anybody know, if table-properties, more exactly cell-properties can be centralized somewhere and how to do it? There is a styles.xml file and THERE IS information on the Web... However, and although my current ability to do quite a few nifty things with XML does not certify complete dumbness on my side, I DO NOT GET IT !!
Chances are, nobody does.
I confront you with a concrete example, anyway. What follows is the definition of 1 table-cell from an original document.xml, with lines that can be commented out or deleted without TextMaker choking on the new resulting XML-code. What I want to know, for now, is how the definitions in the <w:tcBorders/> tag can be centralized. You can remove the tag completely in an attempt to reduce work, but then you lose the table-borders. You cannot define an empty tag <w:tcBorders/>, as TextMaker does then complain about the format of the new document.
Code: Select all
<w:tc>
          <w:tcPr>
            <!--
            <w:tcW w:w="1665" w:type="pct" />
            <w:tcMar>
              <w:top w:w="56" w:type="dxa" />
              <w:left w:w="56" w:type="dxa" />
              <w:bottom w:w="56" w:type="dxa" />
              <w:right w:w="56" w:type="dxa" />
            </w:tcMar>
            -->
            <w:tcBorders>
              <w:top w:val="single" w:sz="4" w:space="0"
              w:color="000000" tmln="10, 20, 20, 0, 0" />
              <w:left w:val="single" w:sz="4" w:space="0"
              w:color="000000" tmln="10, 20, 20, 0, 0" />
              <w:bottom w:val="single" w:sz="4" w:space="0"
              w:color="000000" tmln="10, 20, 20, 0, 0" />
              <w:right w:val="single" w:sz="4" w:space="0"
              w:color="000000" tmln="10, 20, 20, 0, 0" />
              <w:tl2br w:val="nil" w:sz="0" w:space="0"
              w:color="000000" tmln="20, 20, 20, 0, 0" />
              <w:tr2bl w:val="nil" w:sz="0" w:space="0"
              w:color="000000" tmln="20, 20, 20, 0, 0" />
            </w:tcBorders>
            <w:tmTcPr id="1543646498" protected="0" />
          </w:tcPr>
          <w:p>
            <w:r>
              <w:t>1.1.2011</w:t>
            </w:r>
          </w:p>
        </w:tc>
I can automate the creation of a tcBorders tag to all cells, but apart from bloating up the document (as it does already), this conflicts with my sense of ... whatever... beauty? Efficiency? Error-Proneness... maybe. It looks procedural and I already hate that...
On the other hand, a generator cannot be made intelligent enough to liberate us of just all these boring tasks, else it becomes a weapon. For suicide, mainly, but anyway.
Edits: Many attempts to render this comprehensible. All may fail.
