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

Kontext rule for formatting only the first child section in a chapter

Explorer ,
Jan 09, 2014 Jan 09, 2014

Hi all, I have run into a DITA problem. Each chapter of the document, i.e. top-level topic, contains a miniature toc of the nested sections. Therefore the first child topic's title should receive a page break.

fm_levels_1.png

I tried this context rule for the title element, below you find the screenshot which I have tried to translate because the EDD is in German. Even though I define that the context should be the first parent topic only, the result is that every second-level topic now has a page break. Any ideas?

8. Count ancestors: topic

    concept

    task

    reference

    If level is: 2

      8.1 If context is: (topic{first} | concept{first} | task{first} | reference{first})

            ..then set page break.

fm_levels_2.png

Robert

TOPICS
Structured
717
Translate
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 , Jan 09, 2014 Jan 09, 2014

R,

  You have discovered two details of context specifications:

  1. {first} means "first child of the parent" not "first child of this type of the parent"
  2. Only single elements are allowed in parenthesized groups.

You can replace your current rule 8.1 with separate tests for each topic type. In English, it would be:

8.1  If topic{after abstract}

            ...

       Else, if concept{after abstract}

            ...

       Else, if task{after abstract}

            ...

       Else, if referenc{after abstract}

--L

...
Translate
Explorer ,
Jan 09, 2014 Jan 09, 2014

Note, I also tried the after.. indicator because the corresponding topics that should receive the page breaks are always the first following the abstracts which contain the toc.

The context rule looks líke this then:

       If context is: (topic{after abstract} | concept{after abstract} | task{after abstract} | reference{after abstract})

However the same problem occurres, all topic titles of the second level receive the page break instead of only those that directly follow the abstract.

Translate
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 ,
Jan 09, 2014 Jan 09, 2014

R,

  You have discovered two details of context specifications:

  1. {first} means "first child of the parent" not "first child of this type of the parent"
  2. Only single elements are allowed in parenthesized groups.

You can replace your current rule 8.1 with separate tests for each topic type. In English, it would be:

8.1  If topic{after abstract}

            ...

       Else, if concept{after abstract}

            ...

       Else, if task{after abstract}

            ...

       Else, if referenc{after abstract}

--Lynne

Translate
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 ,
Jan 10, 2014 Jan 10, 2014

Hi Lynn, thanks for the hint! Using multiple tests it works fine now. BTW it is a pain that Adobe translated the EDD element names for differrent installation languages, I think everybody on the globe who works with XML will by able to understand english tag names.

In case this is of interest for anyone, here is the resulting context rule in the German EDD:

fm_edd_3.png

Translate
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 ,
Jan 10, 2014 Jan 10, 2014
LATEST

First, regardless of the UI language, you can import element definitions from an EDD using any of the language templates. Second, you can change the template that FM uses when it creates new EDDs (from the commands that in English are labeled StructureTools > New EDD and StructureTools > Export Element Catalog as EDD). Simply copy the desired template to $FMHOME\fminit\fmstruct\elemcat where $FMHOME is the directory in which FrameMaker is installed. I recommend backing up the original first.

You can create an English EDD template from any English EDD simply by deleting all its content.

By the way, you can modify the EDD template by changing its formatting rules, master pages, and so forth. I haven't yet done so for FM 11, but see http://forums.adobe.com/thread/909395 for information on various changes I've made to the English EDD templates for previous versions.

         --Lynne

Translate
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