Quantcast
Channel: Adobe Community : Popular Discussions - FrameMaker Structured
Viewing all articles
Browse latest Browse all 66580

Table Alignment Problem

$
0
0

I have a CALS format table that I cannot get alignment to work properly.  I have the attributes for the table defined and handled in the R/W rules file (posted below).  I have code in the EDD to look at the TGROUP tag align attribute and to apply an initial table format appropriate to the attribute (also posted below).  There are 3 test conditions for left/center and right attribute values, then an else on the off chance that the attribute is not specified.  The system always chooses the ELSE condition regardless of the value of the align attribute.  I have tried different cases on the attribute value and I have tried different quotes on in the EDD around the attribute value.  Nothing works.  It seems like this should be simple.  Any idea what I am doing wrong?

Thanks for any help...

Jim

 

R/W RULES

/* Table Container rule */
element "table" {
   is fm element;

   /* Table subrules */
   attribute "ttabstyle" is fm property table format;
   attribute "frame"
   {
      is fm property table border ruling;
      value "ALL"    is fm property value all;
      value "TOPBOT" is fm property value top and bottom;
      value "TOP"    is fm property value top;
      value "BOTTOM" is fm property value bottom;
      value "SIDES"  is fm property value sides;
      value "NONE"   is fm property value none;
   }
   attribute "colsep" is fm property column ruling;
   attribute "rowsep" is fm property row ruling;
   attribute "orient" is fm attribute;
   attribute "pgwide" is fm property page wide;
}

/* Table Group rules, Table element is container object */
element "tgroup" {
   is fm table element;

   /* Attribute rules */
   attribute "cols"           is fm property columns;
   attribute "colsep"         is fm property column ruling;
   attribute "rowsep"         is fm property row ruling;
   attribute "align"          is fm attribute;
   attribute "charoff"        is fm attribute;
   attribute "char"           is fm attribute;
}

/* ColSpec handling */
element "colspec" {
   is fm colspec;
   attribute "colnum"   is fm property column number;
   attribute "colname"  is fm property column name;
   attribute "align"    is fm property cell alignment type;
   attribute "charoff"  is fm property cell alignment offset;
   attribute "char"     is fm property cell alignment character;
   attribute "colwidth" is fm property column width;
   attribute "colsep"   is fm property column ruling;
   attribute "rowsep"   is fm property row ruling;
}

/* SpanSpec handling */
element "spanspec" {
   is fm spanspec;
   attribute "spanname"  is fm property span name;
   attribute "namest"    is fm property start column name;
   attribute "nameend"   is fm property end column name;
   attribute "align"     is fm property cell alignment type;
   attribute "charoff"   is fm property cell alignment offset;
   attribute "char"      is fm property cell alignment character;
   attribute "colsep"    is fm property column ruling;
   attribute "rowsep"    is fm property row ruling;
}

/* Table Head rules */
element "thead" {
   is fm table heading element;
   attribute "valign" is fm attribute;
}

/* Table Foot rules */
element "tfoot" {
   is fm table footing element;
   attribute "valign" is fm attribute;
}

/* Table Body rules */
element "tbody" {
   is fm table body element;
   attribute "valign" is fm attribute;
}

/* Row rules */
element "row" {
   is fm table row element;
   attribute "valign" is fm attribute;
   attribute "rowsep" is fm property row ruling;
}

/* Entry rules */
element "entry" {
   is fm table cell element;
   attribute "colname" is fm property column name;
   attribute "namest" is fm property start column name;
   attribute "nameend" is fm property end column name;
   attribute "spanname" is fm property span name;
   attribute "morerows" is fm property more rows;
   attribute "colsep" is fm property column ruling;
   attribute "rowsep" is fm property row ruling;
   attribute "rotate" is fm property rotate;
   attribute "valign" is fm attribute;
   attribute "align" is fm attribute;
   attribute "charoff" is fm attribute;
   attribute "char" is fm attribute;
   /*attribute "align"    is fm property cell alignment type;
   attribute "charoff"  is fm property cell alignment offset;
   attribute "char"     is fm property cell alignment character;*/
}

 

EDD tgroup definition

Element (Table): tgroup
General rule: thead?, tbody, tfoot?
Attribute list
Name: align  Choice  Optional
Choices: left | right | center | justify | char
Name: charoff  String  Optional
Default: 50
Name: char  String  Optional
Initial table format
If context is: [align="left"]
Table format: Table w/ Ruling Left
Else, if context is: [align="center"]
Table format: Table w/o Ruling Center
Else, if context is: [align="right"]
Table format: Table w/ Ruling Right
Else
Table format: Table w/Ruling Ctr

 

 

 

Table Markup:

<table frame="NONE" colsep="1" rowsep="0">
<tgroup cols="2" colsep="1" rowsep="0" align="left" charoff="50" char="">
<colspec colnum="1" colname="1" colwidth="2.000in"/>
<colspec colnum="2" colname="2" colwidth="2.000in"/>
<tbody valign="top">
<row rowsep="1">
<entry colname="1" colsep="0" rowsep="0" valign="top" morerows="0" rotate="0">
<para>MD80</para>
</entry>
<entry colname="2" rowsep="0" valign="top" morerows="0" rotate="0">
<para>918/292-3080</para>
</entry>
</row>
<row rowsep="1">
<entry colname="1" colsep="0" rowsep="0" valign="top" morerows="0" rotate="0">
<para>
<revst/>737<revend/>
</para>
</entry>
<entry colname="2" rowsep="0" valign="top" morerows="0" rotate="0">
<para>918/292-3737/3757</para>
</entry>
</row>
<row rowsep="1">
<entry colname="1" colsep="0" rowsep="0" valign="top" morerows="0" rotate="0">
<para>
<revst/>A300<revend/>
</para>
</entry>
<entry colname="2" rowsep="0" valign="top" morerows="0" rotate="0">
<para>918/292-3300</para>
</entry>
</row>
<row rowsep="0">
<entry colname="1" colsep="0" valign="top" morerows="0" rotate="0">
<para>
<revst/>767/777<revend/>
</para>
</entry>
<entry colname="2" valign="top" morerows="0" rotate="0">
<para>817/224-0767/0777</para>
</entry>
</row>
</tbody>
</tgroup>
</table>


Viewing all articles
Browse latest Browse all 66580

Trending Articles