Copy link to clipboard
The heading says it all.
Any help gratefully appreciated.
Copy link to clipboard
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.
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?
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.
Thank you as always, Ian.
I will have an explore of ExtendScript. If I understand correctly, it allows me to automate functions I would otherwise be performing manually within Framemaker? I would have to devise some way for it to determine which cells get a fat rowsep or colsep. Hm.
Meanwhile, if any of you gentlemen have the ear of the FrameMaker development team, the cals spec does provide for three different styles of ruling lines. Would be nice 🙂
Pleased to be able to help, if only in a negative way!
Good luck with the ExtendScript exploration. It will definitely allow you to do what you need, but will take some time to learn if you are not already familiar with FrameMaker's internal architecture.
FrameMaker's CALS table support is based on the original MIL-HDBK-28001 specification. That version only allowed 0 or 1 as values for colsep and rowsep. It may have been the later OASIS amendment made it possible to support values other than 1.
If you do take the ExtendScript route, please be aware that FrameMaker's CALS table handling is effectively hardwired. It will try to fight you if you send it unexpected values for these attributes. I have had to use XSLT to transform the XML that Frame sees into a slightly different structure to get a clean round-trip.
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 ..
You can download a trial of DITA-FMx from here ..
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!
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.