• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Need a little help with an EDD Context Rule

Explorer ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

FM 2017 / DITA 1.3

EDD is ditabase.edd.fm, most of which is stock standard, except I am working with a flattened copy (text insets converted to text).

I have a problem with output and I'm hoping the community can give me a little nudge toward the correct context rules to specify here.

I noticed that on output, my figure titles don't format correctly in at least one circumstance (topic type is TASK):

<steps>

<step>

<cmd></cmd>

<info><fig><title>Title Here</title><image href="foo" /></fig></info>

</step>

</steps>

This is the required structure to get a figure into a step. The problem I have on output is that the figure title comes in with the wrong paragraph style, namely, step.info.begin.

For element <title>, the EDD says

If context is: (fig | figgroup)

Use paragraph format: figure.title

(etc., the point is I haven't touched it)

For element <info>, the EDD says

Format rules for first paragraph in element

If context is: step

Use paragraph format: step.info.begin

(etc., again, haven't touched it)

So it looks to me like the <info> rule is overriding the <title> rule, and I'm having some trouble conceiving a context rule to fix it. When I say I haven't touched anything, that's not strictly true; I have tried to specify this particular context but it hasn't worked, so I reverted my changes. I also tried moving the title rules in case it was an order-of-application thing, but that didn't help either.

I've made a bunch of context rules work in the past. For some reason this one is giving me trouble. I can't seem to find the answer in the structured dev guide, either.

(edited to correct structure sample)

TOPICS
Structured

Views

460

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
community guidelines

correct answers 1 Correct answer

Advisor , Apr 13, 2017 Apr 13, 2017

Ohne,

  You are correct that the first paragraph rule for info is overriding the text format rule for title. FM applies all applicable text format rules first and then applies applicable first and last paragraph rules.

  If the title will never contain more than one paragraph, a simple fix would be to change the text format rule to a first paragraph rule.

         --Lynne

Votes

Translate

Translate
Explorer ,
Apr 13, 2017 Apr 13, 2017

Copy link to clipboard

Copied

Did you check the DTD and loaded the element definition in the templates?

Votes

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
community guidelines
Advisor ,
Apr 13, 2017 Apr 13, 2017

Copy link to clipboard

Copied

Ohne,

  You are correct that the first paragraph rule for info is overriding the text format rule for title. FM applies all applicable text format rules first and then applies applicable first and last paragraph rules.

  If the title will never contain more than one paragraph, a simple fix would be to change the text format rule to a first paragraph rule.

         --Lynne

Votes

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
community guidelines
Explorer ,
Apr 13, 2017 Apr 13, 2017

Copy link to clipboard

Copied

LATEST

First paragraph rule worked; thank you!

Votes

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
community guidelines