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

How to create Exception to TblTitle in Table Format for MIF file

New Here ,
May 06, 2020 May 06, 2020

Copy link to clipboard

Copied

When creating tables via a MIF file, how doI create an exception to the table title of an existing table tag. The point of the exception is to populate the table title with info from the database.

It is a numbered table title. I intend to create the MIF file via a script. 

I'll be using 2 MIF files to create my FM file. One MIF file will hold all the template info. The other MIF file will hold all the tables in the <Tbls> as well as a simple text flow calling each of these tables. 

 

The following syntax is not working for me. 

What am I doing wrong? 

<Tbl
<TblID 11>
<TblTag `Register'>

<TblTitle
<TblTitleContent

<Para
<PgfTag `TableRegTitle'>
<PgfNumString `Table 1:\t'>
<ParaLine
<String `Text Name'>
> # end of ParaLine
> # end of Para
> # end of TblTitleContent
> # end of TblTitle

<TblH #this is the Header Row
<Row
<Cell
<CellContent
<Para
<PgfTag `Cell Head'>
<ParaLine
<String `Bits'>
>
> # end of Para
> # end of CellContent
> # end of Cell

...etc...

Views

2.0K

Translate

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
Community Expert ,
May 07, 2020 May 07, 2020

Copy link to clipboard

Copied

Hi oz1010,

 

What is the exact syntax to include the MIF file with the table formatting?

Then I could test this myself.

 

Best regards

 

Winfried

Votes

Translate

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
New Here ,
May 07, 2020 May 07, 2020

Copy link to clipboard

Copied

HI Winfried, 

First of all, thanks so much for replying. 

Since I'm not sure what you mean about the include syntax, I've copied most of the smaller MIF file, (not the  template MIF) to this post below the line. You can probably use any template file  that has the same para and table tag formats to test. 

The template MIF file (5_XS_Registers.mif - see second line of code) was created by opening my FM template file and simply saving it as a MIF. Then I removed the <Tbls> and deleted the Text Flow associated with the TextRect ID of the first body page (this process is described in "Including Template Files" in the MIF manual) and attached that TextFlow to this MIF file copied below.  (Please let me know if this is not clear enough).

My problem is that I would like to manually populate the numbered ParaTag: TableRegTitle - as you can see, it's populated in the MIF, but does not show in FM (see image).

If you need the template file - then I'll have to email it - I cannot upload a MIF file to this forum, it's not supported. 

oz1010_0-1588869057766.png

This is the result of the code below when opened in FM. Here, I've removed 2 of the body rows, so you should end up with a table  that has a single header row and a single body row.

 

 

<MIFFile 2017> # Generated by FrameMaker 2017
include (5_XS_Registers.mif)

<TextFlow
<TFTag `A'>
<TFAutoConnect Yes>
<TFSideheads Yes>
<FlowDir INHERITLTR>
<Notes
> # end of Notes
<Para
<Unique 1029499>
<PgfTag `0 Heading'>
<PgfNumString `1\t'>
<ParaLine
<TextRectID 8>
<String `Registers'>
> # end of ParaLine
> # end of Para
<Para
<Unique 1041062>
<PgfTag `BodyAfterHeading'>
<ParaLine
<TextRectID 8>
> # end of ParaLine
> # end of Para
> # end of TextFlow

#: Info above this line does not change - it should appear once (think of it as a header for the file
# "Tbls" holds a number of tables (Tbl) each with its own "TblID" tagged with Table Format Register. The script should be creating a number of different Tbl's. The TblID number is used below in conjunction with the ATbl - which is its anchor. You can have a list of ATbl at the bottom (each with its own ID number).

<Tbls
<Tbl
<TblID 11>
<TblFormat
<TblTag `Register'>
<TblTitle
<TblTitleContent
<Para
<PgfTag `TableRegTitle'> # Forces lookup in Paragraph Catalog.
<ParaLine
<String `Example Register1 Name (Ex_Reg1_SN)'> #this string is missing when opening in FM (see image)
> # end of ParaLine
> # end of Para
> # end of TblTitleContent
> # end of TblTitle
> #end of TblFormat


<TblH  # Header Row
<Row
<Cell
<CellContent
<Para
<PgfTag `CellHead'>
<ParaLine
<String `Bits'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `CellHead'>
<ParaLine
<String `Field Name'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `CellHead'>
<ParaLine
<String `Type'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `CellHead'>
<ParaLine
<String `Reset'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `CellHead'>
<ParaLine
<String `Description'>
>
> # end of Para
> # end of CellContent
> # end of Cell

> # end of Row
> # end of TblH

# begin Body Rows
<TblBody
<Row
<Cell
<CellContent
<Para
<PgfTag `CellBody'>
<ParaLine
<String `63:60'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `RegisterField'>
<ParaLine
<String `SRAM_WS'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `CellBody'>
<ParaLine
<String `RW'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `CellBody'>
<ParaLine
<String `0xA'>
>
> # end of Para
> # end of CellContent
> # end of Cell

<Cell
<CellContent
<Para
<PgfTag `CellBody'>
<ParaLine
<String `Some sort of description goes here.'>
>
> # end of Para
> # end of CellContent
> # end of Cell
> # end of Row

 

> # end of TblBody
> # end of Tbl
> # end of Tbls

<Para
<PgfTag `Body'>
<ParaLine
<String `Register Tables for XYZ Block.'>
<ATbl 11>

> # end of ParaLine
> # end of Para

Votes

Translate

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
Community Expert ,
May 08, 2020 May 08, 2020

Copy link to clipboard

Copied

Hi oz1010,

 

I tested this, but I also could not populate the table title with the text from the MIF file.

I suggest to contact the FrameMaker support: tcssup@adobe.com 

If they cannot help, please report this issue in the Adobe tracker:

https://tracker.adobe.com/#/home 

 

Best regards

 

Winfried

Votes

Translate

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
New Here ,
May 10, 2020 May 10, 2020

Copy link to clipboard

Copied

Hi Winfried, 

Thanks so much, this is exactly what I thought my next step should be, to write to Adobe.. I'll let you know if Adobe has any ideas on how to solve. 

Thanks, Orly

Votes

Translate

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
New Here ,
May 14, 2020 May 14, 2020

Copy link to clipboard

Copied

LATEST

HI, So far, no reply from tcssup@adobe.com

 

Votes

Translate

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
Community Expert ,
May 08, 2020 May 08, 2020

Copy link to clipboard

Copied

Hi, If you can't get the MIF approach to work, you may want to consider generating XML instead of MIF. You could set up a FrameMaker structured application to ingest the XML tables instead of using MIF. This may end up being simpler for both table generation from your source and setting up your FrameMaker template. -Rick

Votes

Translate

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
New Here ,
May 10, 2020 May 10, 2020

Copy link to clipboard

Copied

HI Rick,

Thanks for the suggestion. I had tried to steer them that way to begin with, but I'm not as adept with the Structured FM to manage the file. I tried opening a DITA reference file and making changes - but it was taking too long. The MIF solution seemed very elegant and like it would work just as well. Then no one has to be taught structured FM. On the other hand, my engineenring team understands MIF and wants to try it first. They managed to get the MIF to work a little less elegantly, but with more lines of MIF code. I'm afraid that will explode due to the number of tables we'll be populating for each file. 

Votes

Translate

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
Community Expert ,
May 10, 2020 May 10, 2020

Copy link to clipboard

Copied

I understand your hesitation about changing to structured FrameMaker. However, your structured document doesn't have to stay structured; there is a command to remove the structure from the document, while preserving the paragraph/character/table/etc. formatting. Think of it this way: you are using MIF simply to get the data into FrameMaker, but after that you are just working with an FM document. The same could be done with XML: you use it to get the data into FrameMaker but then discard i so you are just working with an unstructured FM document.

 

Here are the pros of XML versus MIF:

 

1) Most database tools have the native ability to generate XML.

2) FrameMaker has robust tools for importing XML and modifying it on import. Even if the XML has unneeded content, it can be filtered out on import.

3) XML can be generated and imported linearly, unlike MIF's separation of flow content from table content, etc.

4) Using XML with FrameMaker will allow you to have a single template instead of using multiple MIF snippets.

5) The intermediate XML file can be made more human readable, which makes development and troubleshooting easier than MIF.

 

Here are a couple of suggestions:

1) If you can provide me with several XML samples, I can mock up a small prototype at no cost to you.

2) We can meet remotely and I will demonstrate some real-world projects that use this approach.

Votes

Translate

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