Home › Forums › DITA and XMetaL Discussion › Default column widths in tables › Reply To: Default column widths in tables
Reply to: Default column widths in tables
February 10, 2012 at 10:27 pmInserting a CALS table with proportional colwidth set to “*” is default behaviour in XMetaL Author (all versions back to 1.0) and is not easily modifiable (it is possible but would require a new “insert table” dialog to be coded that does not call the InsertCALSTable() API and instead builds up the table using other means, or for a script to be set to run at some point after the table was inserted to modify what was inserted).
The CALS spec says that the following are all equivalent:
colwidth attribute not present
colwidth = “*”
colwidth = “1*”
[quote=CALS spec (my highlighting in blue)]3.2.3. colwidth column width specification
Either proportional measure of the form number*, e.g., “5*” for 5 times the proportion, or “*” (which is equivalent to “1*”); fixed measure, e.g., 2pt for 2 point, 3pi for 3 pica. (Mixed measure, e.g., 2*+3pt, while allowed in the full CALS table model, is not supported in this Exchange model.) Coefficients are positive integers or fixed point numbers; for fixed point numbers, a leading (possibly 0) integer part is required, and implementations should support at least 2 decimal places. A value of “” [the null string] is treated as a proportional measure of “1*”.
The fixed unit values are case insensitive. The standard list of allowed unit values is “pt” (points), “cm” (centimeters), “mm” (millimeters), “pi” (picas), and “in” (inches). The default fixed unit should be interpreted as “pt” if neither a proportion nor a fixed unit is specified.
Declared value: CDATA
Default: IMPLIED (means assume a proportional measure of “1*”)
I'm trying to understand what issue setting the value to “*” causes in your system. Perhaps it is actually breaking something (in which case the other system appears to support CALS tables incorrectly) or perhaps you just wish to have a “cleaner” XML file?
I suspect the reason we set this attribute by default is because in the past we may have seen some DTD that use CALS tables that set this attribute to be #REQUIRED (vs the CALS spec's declaration of #IMPLIED) and it may have been easier to just always insert it when that attribute is defined.