Thanks everyone who responded to this question. The conclusion is that we can't 
expect FrameMaker to automatically size the column widths depending on the 
cells' contents. The next best solution seems to be a post-processing script. 
Maybe a preprocessing script is feasible, but since XML is supposed to be 
format-independent, we really shouldn't know the font type and size or padding 
in each cell, so preprocessing is probably a bad idea.

In the interests of clarity, I should point out that Russ Ward seems to be 
correct (at least in FrameMaker 10). If no column widths are specified in the 
XML file, FrameMaker uses the column widths of the table style (i.e. template), 
even though you don't explicitly specify them. FrameMaker saves the number of 
columns and the width of them behind the scenes whenever you save that table 
style. When you import the XML table using that style, it uses the width of the 
columns in the table style going from left to right (of course), and if the XML 
table has more columns than the table style, it keeps using the width of the 
last (rightmost) column. I know it never truncates nor adds columns according 
to the table style.

Thanks for letting me know that the widths have to be fixed numbers and can't 
be percentages.

Fei Min Lorente
Senior Technical Communicator
Medical and Wireless Division
feimin.lore...@onsemi.com<mailto:feimin.lore...@onsemi.com>
+1 519-884-9696 ext. 2297 | Waterloo office
+1 519-831-4931 | mobile
+1 905-631-5724 | fax
www.onsemi.com<http://www.onsemi.com/>



Hi,



last time I had a closer look I found that FrameMaker would only support

the CALS table model with fixed numeric column widths, not with

percentages.



Although it may be possible to set the widths via scripting, the result

will probably not be satisfying at the first attempt. (... especially

when translating the text in different languages)



Each column has a numeric "column width" entry.

If these entries are deleted or not written, FrameMaker assumes all

colums to have the same width when interpreting the XML code.

(I have an example here where all columns are output with a width of 2

cm, but I do not know what the default value would be.)



Although a template may seem to specify a certain no. of columns (when

inserted as a new table), in the XML workflow a template will only have

influences on margins, ruling and shading. It does not mean that all

tables would be complemented or trunkated to this quantity of columns.



We are using FrameMaker as XML editor, so the columns widths are

specified during the editing process and are thus transfered to the XML

code. Indesign e.g. would not be "able" to understand this XML directly

without transformation.

As you can see, one XML is not like another...



Tino H. Haida, Berlin



 Lin Sims:



> We've an internal perl script that sets up tables at a predefined table width 
> with the columns at predefined widths, but I'm pretty sure those measurements 
> are hard-coded into the script that creates the XML file from the Excel 
> spreadsheet. It's doable if you know what sizes you're working with before 
> you get started, including how many columns you need included.

>

> XML might let you set column widths as a percentage of page/screen width, but 
> I don't think that's directly transferable to FM. Can perl handle 
> calculations?

>

> On Mon, Feb 23, 2015 at 4:26 PM, Scott Prentice <sp14 at 
> leximation.com<http://lists.frameusers.com/mailman/listinfo/framers>> wrote:

>

> Fei Min...

>

> FM won't auto-adjust table columns in any useful way. The only way I know of 
> is to write a script or plugin to analyze the contents of the cells and do 
> the width adjustment based on some predefined logic (widest graphic, or 
> amount of text, etc.).

>

> Would love to hear I'm wrong .. but hot holding my breath.

>

> ...scott

>

> On 2/23/15 9:16 AM, Fei Min Lorente wrote:

>

> Hi folks:

>

> I found this discussion from 2008: 
> https://forums.adobe.com/message/1279946#1279946 [3], and this helpful answer 
> from Russ Ward in 2010: https://forums.adobe.com/thread/577820?tstart=0 [4], 
> but I don't see the solution that I'm looking for. My manager (a software 
> development guy) would like to create an XML file that I can import into 
> FrameMaker that doesn't specify the width of each column. He's taking output 
> from Jira, and people can create tables in the Description field there, but 
> he has no way of knowing how wide the columns are. He figures that if HTML 
> can automatically size the columns to suit the contents, surely FrameMaker 
> can do this too (I'm not so sure).

>

> I've tried it myself, and the column widths in the table template apply when 
> you don't specify widths in XML. If you have more columns than are in your 
> template, it seems to use the width of the last templated column. And the 
> tables might contain graphics as well as text.

>

> Anyone have any better ideas?

>

> I'm using FrameMaker 10 on Windows 7. I think my manager is using Perl or 
> some other scripting language. Jira outputs HTML as well as some other text 
> format.

>

> Fei Min Lorente

>

> Senior Technical Communicator

>

> Medical and Wireless Division

>

> feimin.lorente at 
> onsemi.com<http://lists.frameusers.com/mailman/listinfo/framers>

>

> +1 519-884-9696 ext. 2297 [5] | Waterloo office

>

> +1 519-831-4931 [6] | mobile

>

> +1 905-631-5724 [7] | fax

>

> www.onsemi.com [8]

>


_______________________________________________


You are currently subscribed to framers as arch...@mail-archive.com.

Send list messages to framers@lists.frameusers.com.

To unsubscribe send a blank email to
framers-unsubscr...@lists.frameusers.com
or visit 
http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com

Send administrative questions to listad...@frameusers.com. Visit
http://www.frameusers.com/ for more resources and info.

Reply via email to