Highlighted

Ancestoral Context in FrameMaker 2019

New Here ,
Oct 01, 2019

Copy link to clipboard

Copied

I am trying to create a context rule that basically says:

 

If you are inserting a FigureTitle into a Figure that is located in PgblkDESC (Highest-level element), and it is the first FigureTitle in that document, use paragraph format Figure0. If it’s not the first FigureTitle in that document, use paragraph format FigureTitleCont.

 

Attached is a clip of what I have currently that does not seem to be working. Anyone have any ideas why?

Capture.JPG

 

TOPICS
Scripting, Structured

Views

535

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

Ancestoral Context in FrameMaker 2019

New Here ,
Oct 01, 2019

Copy link to clipboard

Copied

I am trying to create a context rule that basically says:

 

If you are inserting a FigureTitle into a Figure that is located in PgblkDESC (Highest-level element), and it is the first FigureTitle in that document, use paragraph format Figure0. If it’s not the first FigureTitle in that document, use paragraph format FigureTitleCont.

 

Attached is a clip of what I have currently that does not seem to be working. Anyone have any ideas why?

Capture.JPG

 

TOPICS
Scripting, Structured

Views

536

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
Oct 01, 2019 0
Mentor ,
Oct 02, 2019

Copy link to clipboard

Copied

Hi Jolly,

 

I don't see anything immediately wrong with your rules. Which paragraph format is actually being applied? That would be helpful to know. Also, note that there is a helpful tool under Structure > Show Element Context that may allow you to see exactly how your rules are being interpreted.

 

Russ

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...
Oct 02, 2019 0
Enthusiast ,
Oct 02, 2019

Copy link to clipboard

Copied

Hi Jollydawg,

The problem with the rules you have defined is due to a FrameMaker limitation.

The context {first} is testing whether the FigureTitle is the first child element of Figure. The other contexts are testing for when Figure is a descendant of either PgblkDESC or PgblkTEST.

The limitation with {first} is that it is only checking if the element is the first in its parent. So if there are other element preceeding it, the test fails. 

At a guess I would say you are working with ATA iSpec 2200 DTDs? In the past I have used scripting or FDK to add the missing context resolution capability to an EDD. Let me know if you want to know more about that.

I hope that helps a little?

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...
Oct 02, 2019 0
New Here ,
Oct 02, 2019

Copy link to clipboard

Copied

Thanks Ian. I see now that I was misinterpreting the {first} context rule to be the first instance of FigureTitle within the Figure element instead of the first instance of ANY element within the Figure element. With the Anchor element already predefined as the first element in the General Rule for Figure, FigureTitle would never pass that test. When I removed the {first} SubRule the other context rules worked perfectly. Thanks for responding!

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...
Oct 02, 2019 0
New Here ,
Oct 02, 2019

Copy link to clipboard

Copied

Thanks for responding Russ. Turns out it was the {first} SubRule that was causing the problem. I removed the SubRule and the rest works great.

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...
Oct 02, 2019 0
New Here ,
Oct 02, 2019

Copy link to clipboard

Copied

Thanks for responding Russ. Turns out it was the {first} SubRule that was causing the problem. I removed the SubRule and the rest works great.

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...
Oct 02, 2019 0
Mentor ,
Oct 02, 2019

Copy link to clipboard

Copied

Ah, and I see that I did miss how you said "the first FigureTitle in that document", so thanks to Ian for catching that.

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...
Oct 02, 2019 0