Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Conversion Table Questions: problems converting tables to structured

Guest
Sep 01, 2011 Sep 01, 2011

Copy link to clipboard

Copied

I'm in the process of converting unstructed FM8 docs to structured docs using FM10 and DITA structure. Right now I'm trying to build a conversion table to structure the docs, but I'm having a lot of trouble with the tables. The main problem seems to be with the tgroup element since I can't figure out how to get the thead and tbody to wrap in the tgroup element.

Here is an example of one of the tables I'm trying to structure:

Structured table.png

This is the Table section of the conversion table I've had the most success with:

Table Elements.png

And this is the result:

structured view.png

As you can see, the thead and tbody elements are not wrapped in tgroup and the structure is invalid. I've been playing around with the conversion table for several days now and can't seem to figure out how to fix this. If anyone has any suggestions, they would be greatly appreciated!

Thanks,

D'Arcy

TOPICS
Structured

Views

1.6K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 01, 2011 Sep 01, 2011

Copy link to clipboard

Copied

D’Arcy,

FrameMaker’s own table model is somewhat different from what DITA/CALS commands. While the CALS table model consists of a container <table> which contains omne <title> and maybe many tables <tgroup> the situation is different with FrameMaker. Apparently you are creating your own structure and do not rely on some premade solution, as thexy all have to deal with this.

If you want to take advantage of FrameMaker’s behaviour with a repeating table title, this title muts be part of the table itself and can not exist outside the table. Something like,

<fm-table>

  <fm-tabletitle>...

  <fm-thead>...

  <fm-tbody>...

</fm-table>

(where <fm-table> is the table. not a table container likle <table> is in DITA/CALS)

Some other observations:

• it seems to work, but I huess you want each sequence of <entry> elements to form a <row>, so you would write | entry+ | row  |

• Since neither thead nor tbody can exist without at least a single row, you would write for both: | row+ | thead  |

• If you have tables without header rows, you should write: | thead?, tbody |  tgroup  |

- Michael

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 01, 2011 Sep 01, 2011

Copy link to clipboard

Copied

Thanks Michael, but I'm still a bit confused.

I'm trying to convert my doc into valid DITA structure, and I was under the impression that to do that tables required a tgroup element that contained the thead and tbody.

I'm not trying to create my own structure or set-up a repeating table title, I just want to figure out how to make a conversion table that will properly convert tables ino a valid DITA structure.

Thanks,

D'Arcy

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 01, 2011 Sep 01, 2011

Copy link to clipboard

Copied

D'Arcy,

  Here are a few observations that might help:

1) The structure you use within FM (which is what the conversion table helps create) need not be exactly the same as the structure you use in XML.

2) Do not confuse the element named table with a FrameMaker table.

3) As Michael has pointed out, the CALS table model used by DITA is a five-level structure:

table

  tgroup

    tbody

       row

         entry

while the FrameMaker table model has 4 levels:

table

  tbody

    row

      cell

4) FrameMaker can map between the 5-level structure and the 4-level structure in one of two ways, controlled by the element definitions (usually specified in an EDD), the read/write rules, and the DTD:

a) The element named table can be a container while the element named tgroup is the actual table. This model has a closer correspondence between the FrameMaker and the DITA table structure. Michael has pointed out one of its biggest weaknesses. If a FrameMaker table (regardless of its element name) has a title, then FrameMaker repeats the title on each page of a multipage table. However, if the element named table is a container and the actual table is an element named tgroup, the title is a container preceding the table and this automatic repetition does not happen.

b) If you are sure that your tables will always consist of a single tgroup, you don't have to use the tgroup element within FrameMaker. Make the element named table a FrameMaker table and include the read/write rule:

element "tgroup" unwrap;

FrameMaker will recreate the tgroup element whenever you save a document as XML. This model allows you to make the table title a FrameMaker table. However, you cannot use the element named title as both a FrameMaker table title and a container. Typically, therefore, people use the element named title as a container that is the title of things like chapters and sections and use an element named something like tabletitle for the title of tables.

Read/write rules like:

element "title" is fm element:

element "title" is fm table title element "tabletitle"'

let you save your documents as XML with both title and tabletitle represented as <title> in XML. You'll need to use a custom client or XSLT to map the XML element named title to either title or tabletitle depending on whether the XML element occurs within a table or not.

5) Your conversion table had one row with T: in column 1 and another with T:Format A in column 1; one mapped to table and the other to tgroup. The row with T:Format A would apply to all tables with the specified format, the other row would apply to all tables with other formats. These conversion table rows do not define a relationship between table and tgroup. Map T: to table if you want the model in 4b) above and to tgroup if you want the model in 4a). In the latter case, use an additional row with:

title?, tgroup

in column 1 and  table in column 2.

     --Lynne

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 15, 2011 Sep 15, 2011

Copy link to clipboard

Copied

LATEST

Thanks a lot Lynne. I don't know if I'm missing something, but I'm still unable to get the tables to convert to a legal structure

using the conversion table.

I'm confused by your comment in notes 1 and 2. Don't the FM table parts have to be matched up to DITA-legal table elements?

I followed your suggestions to acheive the 4a model and mapped T: to table and used the row title?, tgroup (column 1) and table (column 2). This results in the following (I get the same result from using title or tabletitle).

Structured table.png

As you can see, the structure works with the exception of the title which gets wrapped inside the tgroup with the T: table rule.

How can I keep this tgroup structure while placing the title in a legal position?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines