Highlighted

Complex context rules in EDD (for inherited properties)

Explorer ,
Jan 22, 2019

Copy link to clipboard

Copied

Hi

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][1]/@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?

Cheers

T

Trevor,

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?

Ian

TOPICS
Structured

Views

474

Likes

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

Complex context rules in EDD (for inherited properties)

Explorer ,
Jan 22, 2019

Copy link to clipboard

Copied

Hi

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][1]/@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?

Cheers

T

Trevor,

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?

Ian

TOPICS
Structured

Views

475

Likes

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
Jan 22, 2019 0
Explorer ,
Jan 22, 2019

Copy link to clipboard

Copied

..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!

cheers

T

Likes

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
Reply
Loading...
Jan 22, 2019 0
Enthusiast ,
Jan 22, 2019

Copy link to clipboard

Copied

Trevor,

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?

Ian

Likes

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
Reply
Loading...
Jan 22, 2019 1
Explorer ,
Jan 22, 2019

Copy link to clipboard

Copied

Thanks Ian.

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!

cheers
T

Likes

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
Reply
Loading...
Jan 22, 2019 0