Skip to main content
Participant
September 28, 2013
Answered

Table format problem - Please help

  • September 28, 2013
  • 1 reply
  • 1595 views

Here is what I am trying to do:

I have a set of documents in xml fomrat following the docbook standard.  In these documents there are too types of table.  The standard table with its element tag TABLE and an informal table with element tag INFORMALTABLE.

When these are opened and my format file and EDD applied I want the Standard Tables to have a blue shaded header and the Informal Tables to have a grey shaded header.  I have created the appropriate table templates.  I cannot figure a way via the EDD to specify the table format type that works.  When I open an xml and apply the edd and the format all the tables open using the table format that is first in the list.

What can I do to the EDD to achieve my goal?

Thank you in advance

This topic has been closed for replies.
Correct answer Lynne A. Price

If you store the table format name in an attribute of the table (object), you can use r/w rules to map it. The following rules are used for DITA processing ..

element "tgroup"

{

  is fm table element;

  attribute "cols" is fm property columns;

  attribute "outputclass"

  {

    is fm attribute "outputclass";

    is fm property table format;

  }

  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;

  attribute "colwidth" drop;

}

You'll notice the outputclass attribute is defined as the table format property. Note that this is an attribute of the "tgroup" element, which in the DITA model is the table object. The table element is actually a container that wraps the tgroup object.

Cheers,

...scott


Russ,

     Thanks for letting me know my messages were not getting through. I just replied to the original rather than going through the forums interfaces and had no idea there was a problem. I attempted to post twice on this thread today:

    The messages were:

Russ,

   You are correct. An EDD can specify an initial table format. The word "initial" is key. It is the format that is used when a new table is created, whether the new table is created interactively by the user or by opening an SGML or XML document. Initial table formats do not affect existing tables. In fact, for a table created interactively, the initial table format determines the format that is highlighted when the Insert Table dialog first comes up. The user is free to choose another format if desired.

    and

Qualar,

    R/w rules are not context sensitive so that if you are using a tgroup element within FM, they will not be able to help. The definition of tgroup in your EDD can set an initial table format of Format A if the tgroup is within the table element and Format B if the tgroup is within informaltable. Just make sure you have imported the EDD into the template before opening the XML document. As you've noticed, if you open the XML document and then import the EDD, the tables already exist and their format is not affected.

          --Lynne

1 reply

Legend
October 1, 2013

Hi qualar,

If I understand your question, you want to affect the formatting of a table with an EDD import. This is unfortunately not possible. This limitation is actually one of the common complaints with structured Frame. Table format control is not nearly so solid as text format control. As far as I know, an EDD import will not affect the current formatting of any table.

The only thing that table format parameters do in an EDD is affect new tables. I believe this includes tables generated during an XML import if no format is specified. If you really need tables to import at a specific format, the format must be explicitly declared in the XML markup and you might need read/write rules to handle. Then, tables will at least start out as the desired format.

I don't use DocBook so I can't comment on whether the FM application accounts for table formats. I would assume it does, though. If your XML is coming from somewhere else, you'll need to get the format name(s) into the correct attributes. XSLT might be one option to do this, if your original authoring environment is not equipped to handle it.

Russ

qualarAuthor
Participant
October 1, 2013

Russ,

Thank you for your excellent explanation.  Do you think this will be possible using RWR?

Basically in Docbook XML the 2 table elements I am interested in are <table> and <informaltable>

Could I do something like this, make:

<table>  = <table tableformat = "Format A">

<informaltable> = <table tableformat = "Format B">

Inspiring
October 1, 2013