Skip to main content
Inspiring
April 2, 2017
Answered

Is there a way to specify different thicknesses of table ruling lines in an xml file?

  • April 2, 2017
  • 2 replies
  • 728 views

The heading says it all.

Any help gratefully appreciated.

Jack

This topic has been closed for replies.
Correct answer Ian Proudfoot

Sorry Stefan, I have to disagree with you on this one.

FrameMaker does not provide a direct way to change the ruling style according to any specific property of the XML. You can choose if any of the cell's borders are ruled or not, but you can't state the style of the ruling. The thickness of the rule will be defined in the structured template's table catalog.

I wish it were different because the old rule that XML should not carry any styling information is already broken by a table's various alignment attributes. From my many years of FrameMaker/XML experience I know that there are times when the ability to change a table cell's background colour or ruling style is driven by essential document semantics and not simple styling.

Jack, when I have to do this sort of thing I now use ExtendScript to automate the change of table properties if it can't be handled by FrameMaker's native abilities.

Ian

2 replies

ScottPrentice
Inspiring
April 2, 2017

Jack,

This may be a bit more than you need, but DITA-FMx provides the capability for applying cell ruling and shading based on an attribute value assigned to the row or cell. For you to make use of this would require that you're using DITA and DITA-FMx (a plugin that I produce). Here's the info on this feature ..

     http://docs.leximation.com/dita-fmx/2.0/?ditafmx_tablerulingshading.html

You can download a trial of DITA-FMx from here ..

     http://leximation.com/dita-fmx/

If you're not using DITA, your best bet is to do this with ExtendScript, as Ian suggests. You might use a similar concept to that in DITA-FMx, by setting attribute values on specific table components, then use ExtendScript to assign the formatting based on those attribute values.

Note that if your table formatting is consistent, and can be defined and applied by setting the table format, then you can set up Frame to apply that table format to tables. This is the way the default DITA support in Frame should be working. However, if you need to apply ad-hoc styling to table cells, that requires some extra effort from some type of scripting.

Best of luck!

Scott Prentice

Leximation, Inc.

www.leximation.com

Inspiring
April 3, 2017

Thank you, Scott.

I read your spec. Very impressive achievement, and nobody could complain about your very modest price tag. But the cost to my brain of adopting your tool set, I'm afraid, is higher than the reward it would bring me.

Jack

Legend
April 2, 2017

That depends on the kind of XML: DITA, DocBook, XHTML, ... If the specific XML in question has an attribute for this: Yes, if not: No.

However, generally speaking, you don't want to do this in XML. Things like the thickness of a table ruling line is a pure visual formatting information and should not be part of the XML / content layer, but of the formatting process - that is, the FrameMaker template used to render the XML or the CSS for the output.

Inspiring
April 2, 2017

Thank you, Stefan.

DITA, DocBook, XHTML are all foreign to me. I'm just generating regular old XML to import into FM.

I wish I didn't have a very compelling reason for needing the ruling line flexibility, but I'm afraid I do. That said, which one should I go for? And how steep a learning curve would I face? And would I be giving anything up?