I was checking my answer to another question in this forum about table properties when I discovered that my recollection of how certain properties worked was faulty. This has revealed an omission in our EDD which I'd like to rectify, but the reference guide hasn't got enough detail to help me.
Our table schema allows for cell align and valign attributes to be specified at any level (th, tb, tf, tr, td) and inherited by descendant elements. Thus the text alignment of a table cell will be governed by the cell's align attribute/property, if that is omitted then it will use the row's align property, if that is omitted it will use the th/tb/tf align property, and so forth.
The reference guide notes that the align and valign attributes are automatically translated by Framemaker without needing to be specified in read/write rules, but it also notes that when tables are displayed in the document view the cells are not aligned automatically; "you must write format rules to use these attributes to format a table".
So that is what I am trying to do. It's easy to respect the cell's own attribute: 'context rule, if context is [align = "center"]' etc., but what I want is something like XPath's ancestor axis: off the top of my head it would be something like ancestor-or-self::*[layout]/@layout = "center"
Can an EDD manage contexts like this? If not, is there anything better than a huge series of hierarchical context tests to achieve the same thing?
..and I've just realised that it's worse than I thought because both horizontal and vertical alignment would have to be specified within the same matching context rule.
OK, there must be a better way. Help!
In my experience this requires a lot of nested context rules. I don't know of any alternative. You can of course borrow the formatting from an existing example. I included this formatting in several of the S1000D EDDs which are installed with FrameMaker. You will find it here: [FM_install_folder]\Structure\xml\S1000D\description\description_401.edd.fm
In the EDD the Element definition starts on page 99.
I hope this helps?
I hoped I was missing something. Evidently not, I suppose that's reassuring in a way.
Fortunately there's nothing too difficult about nesting all the rules, it's just very cumbersome and is not the sort of thing I feel good about passing on to somebody else to maintain!