A couple of changes for any version after 4.0:
- The XML initialization can be free formated; newlines are now allowed inside of tags
- .t2trc, t2t.rc, .t2trc.xml, t2t.rc.xml are all legal names. Eventually, the .xml ones will be phased out.
Here is an example t2t.rc file.
<?xml version="1.0"?>
<t2t>
<general>
<delim>:</delim>
<title>Round 4</title>
<skipFields>zz</skipFields>
<squeeze>true</squeeze>
<header>true</header>
<overwrite>true</overwrite>
<quiet>true</quiet>
<verbose>false</verbose>
<equal>false</equal>
<addParagraph>true</addParagraph>
<oneTable>false</oneTable>
<headerFile>/home/steve/header</headerFile>
<top>/home/steve/preamble</top>
<bottom>/home/steve/html/list/footer</bottom>
<emptyRowCellAtt>class = "emptyRow"</emptyRowCellAtt>
<cellAlignments>left</cellAlignments>
<cellWidths>50</cellWidths>
<nbsp>true<nbsp>
<limit>4<limit>
</general>
<body>
<bgcolor>#FFFFFF</bgcolor>
<vlink>#FF0000</vlink>
<alink>#00FF00</alink>
<link>#0000FF</link>
<text>#000000</text>
<background>temp.gif</background>
</body>
<table>
<ledgerColors>#D3D3D3, #FFFFFF</ledgerColors>
<cellspacing>4</cellspacing>
<cellpadding>2</cellpadding>
<border>1</border>
<width>100%</width>
<bgcolor>#FFFFFF</bgcolor>
<align>center</align>
<frame>above</frame>
<rules>none</rules>
<hilightColumn>
<number>2</number>
<color>#00FF00</color>
</hilightColumn>
</table>
<cell>
<bgcolor>grey</bgcolor>
<HeaderColor>#00FFCC</HeaderColor>
</cell>
</t2t>
The body, cell, and table sections contain the HTML attributes for
those tags. See below for the ones that are not attributes. Styling tag attributes have
been deprecated in favor cascading style sheets (CSS).
General Section
| Name | Explanation |
| delim | Data delimiter |
| title | Title for the HTML document |
| header | Create an H1 tab for the title |
| quiet | Quiet mode |
| verbose | Verbose mode |
| overwrite | Controls if t2t will overwrite existing .html files |
| nbsp | prints a for an empty cell |
| addSpace | Adds 5 pixels of space around each table |
| equal | Ensures all rows have the same number of columns |
| limit | limits the number of columns split. |
| headerFile | Path to file to be added in the head portion |
| top | Path to file to be added to the top of each file |
| bottom | Path to file to be added to the bottom of each file |
| emptyRowCellAtt | CSS name for all the cells on an empty row |
| ledgerColors | The alternating colors of each row |
| cellAlignments | The alignments for each cell |
| cellWidths | The widths of each cell |
| skipFields | Skip any column numbers that matches this regular expression. |
Table Section
| Name | Explanation |
| ledgerColors | The alternating colors of each row |
| cellAlignments | The alignments for each cell |
| cellWidths | The widths of each cell |
| hilightColumn color | Color of the highlighting header cell |
| hilightColumn number | Column number to hilight |
XML Format Note
The T2t distribution does not include an XML parser. I did want to force each person to
install a Perl XML parser. Since an XML parser is not included, t2t parses the XML itself. Overall
this is not a problem. You can use any XML editor to edit the file. You can validate the XML. I have not
created a DTD or XML Schema, but either one or both could be created. The initialization file is legal XML.
Each user should edit the t2t.rc file to suit their needs. The above example lists
all the currently available options. You can (and should) remove the ones that you do not use. You
can either just remove the line or comment the line out.
|