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

Restrict element levels

Enthusiast ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

In our EDD, we have an element called Headings, which manages all our headings, up to 6 child-levels, with General Rule: <TEXT>, Content*, Headings* (Content being an element for inserting paragraph text). When inserting the element, it works correctly, inserting the element as a child of the previous element. But, when hitting Enter, instead of prompting for the next allowed element (Content or child-Heading), it repeats the Heading as if another heading on the same level is added. Is there a way to prevent this from happening using EDD rules?

ElementLevel_Correct.pngElementLevel_Wrong.png

Views

536

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 , May 03, 2021 May 03, 2021

Quntin,

   Thanks for the clarification and the example. You describe a typical structure for technical material in which a chapter is divided into sections, sections into subsections, subsections into sub-subsections, and so forth. What I suggest, consistently with Matt's remarks, is:

 

1. Instead of using a Headings element for subsections and their further divisions, reuse Section.

2. Your initial general rule for the Headings (now Section) element was <TEXT>, Content*, Headings*. You expect

...

Votes

Translate

Translate
Community Expert ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

You have Content set up as a child of Headings.

Pull Content out of the General Rule for Headings, and place it in the General Rule for Section instead.

Consider whether Content is part of a heading (is a child) or whether Content is instead part of the larger Section element, and not part of a Heading.

 

In other words, set up Content as a sibling of Headings, rather than a child of Headings.

 

Semantically, I would also relabel Headings to Heading, as there should only be a single Heading per Section.

 

This should clear up much of your problem.

 

NOTE: I replaced an earlier reply after seeing your other post with a screenshot showing your Section element, not referenced here.

-Matt Sullivan
FrameMaker Course Creator, Author, Trainer, Consultant

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
Enthusiast ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

@Matt-Tech Comm Tools: My EDD already had the following:

Element (Container): Section
General rule: Headings, Content*

 

Element (Container): Headings

General rule: <TEXT>, (Headings | Content | List)*

(Under each heading element, there could be sub-headings, content or a lists.)

 

Element (Container): Content

General rule: <TEXT>, (Headings | Content | List)*

(Under each Content element, there could be more content, sub-headings or lists.)

 

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 ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

Quintin,

    There are several related questions coming up in this discussion:

1)  How can you limit the nesting level of elements in a structured document, for example, if you want to permit up to 6 level of Headings in your documents, how can you prevent a user from entering a 7th level? When I saw the title of this thread, "Restrict Element Levels", that's what I thought you were going to ask.

2)  What is the result of pressing Enter in a structured document?

3)  What are the implications of using <TEXT> along with elements in a general rule?

4)  What is the best way to define Headings?

Given your initial comments along with the commens you and Matt have seen since. I plan on responding to the 4th one shortly in a different message. As I have time, I hope to address the others in separate threads.

        --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
Advisor ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

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 ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

And my last related comment is now posted as Limiting nesting level in structured documents - Adobe Support Community - 12012514.

         --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
Advisor ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

Quintin,

    I think of "heading" as a synonym for "title" and consider these words to refer to a label that appears at the start of a document or division of a document. Such headings can appear in a table of contents, and are typically followed by paragraphs, lists, tables, figures, and maybe subdivisions. The divisions can be called "chapters", "sections", and, in online environments, sometimes "divisions". I have also heard both "heading" and "title" refer to both a label for following content and for an entire labeled division of a document consisting of both the label and the content. It is not unusual to have different names for longer higher-level divisions ("chapter" or "section") than for shorter, more-deeply nested divisions.

    I also use "paragraph"  to refer to a sequence of sentences starting on a new, usually indented line. In some environments (for example in military documents), though, a paragraph is a numbered, lower-level division of a document, beginning with a title, and containing either numbered sub-paragraphs or a paragraph in the elementary-school sense I use.

    I'm sure you have a clear sense of what the difference between a Headings and a Section is in your documents, but I would appreciate a description before I suggest general rules you might use. Is a Headings a subsection of a Section? Will you have an element called Heading as well as the current Headings?  Matt's comments suggest general rules that implement particular answers to these questions.

    Years ago, I helped another EDD developer who was trying to use an element named Paragraph. Her confusion was that she was trying to use the same element in both senses described above. Once she picked one element name for a titled division of a section and a different element name for a sequence of sentences that starts on a new line, the definitions fell into place.

   Anyway, once I have a better understanding of the structure you are trying to define, I'd be happy to make suggestions for general rules and other parts of the element definitions.

    --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
Enthusiast ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

@Lynne A. Price: our documents would have the following 'structure':

Chapter - this is the top-level

Each Chapter consists of various Sections

Each Section would consist of  a Level 1 Heading, which can be followed by several paragraphs and/or Sub-Headings (down to 6 levels), e.g.:

Chapter

 Section - Level 1 Heading

 Some paragraph text.

  Level 2 Heading

   Level 3 Heading

   Some paragraph text.

   Level 3 Heading

   Some Paragraph text.

    Level 4 Heading

     Level 5 Heading

      Level 6 Heading

      Some Paragrph text.

      Level 6 Heading

      Some Paragrph text.

     Level 5 Heading

     Some paragraph text.

  Level 2 Heading

  Some paragraph text.

 Section - Level 1 Heading, etc.

 

 To clarify my original question, after inserting a Heading element, the next element would either be a paragraph or lower-level heading - never a Heading element on the same level in the structure.

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 ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

Quntin,

   Thanks for the clarification and the example. You describe a typical structure for technical material in which a chapter is divided into sections, sections into subsections, subsections into sub-subsections, and so forth. What I suggest, consistently with Matt's remarks, is:

 

1. Instead of using a Headings element for subsections and their further divisions, reuse Section.

2. Your initial general rule for the Headings (now Section) element was <TEXT>, Content*, Headings*. You expect the text entered at the beginning to be one of  the Level n Headings. Try using an element named Heading instead.

3. Finally, instead of an element named Content, you can put the types of content directly into the definition of Section. So that the Section general rule would now be something like Title, (Paragraph | List | Table | Figure)*, Section*, which means that Section has three parts: a title, optionally some  Paragraph, List, Table, and Figure elements, and possible subsections. Notice that this three-part approach is the same breakdown as defined in your old Headings general rule.

 

The format rules for Title would make the appearance of the Title for different levels of sections and subsections vary appropriately.

 

Would this use of the words Section and Heading work in your organization? Would it be natural for you and your colleagues to discuss something like a third-level section, say?

 

If you follow my suggestion, your example Section would have the following structure:

SV.png

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
Enthusiast ,
May 03, 2021 May 03, 2021

Copy link to clipboard

Copied

LATEST

@Lynne A. PriceYour suggestion would definately work for us. I had a bit of a 'play' with our EDD to replicate your example. It actually works very well and fairly easy. THANKS!!

(I think my mistake is thinking of elements and the document structure as an outline with each element being a child of the preceding element, rather than an element being a collection of other elements.)

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 ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

Quintin,

    I just started a related thread: The Enter key in a structured document - Adobe Support Community - 12010203.

      --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
Enthusiast ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

I've 'resolved' my 'issue by removing the Content element from the Section element. Now, after adding a Section element, the option option available is a Heading. When pressing enter after entering the Heading text, the available elements are listed: <TEXT>, Content, Headings, List - which is exactly what I wanted :-).

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
Enthusiast ,
May 02, 2021 May 02, 2021

Copy link to clipboard

Copied

(Don't you hate it when you accidentally click on the Post button instead of the scrollbar on the side of the brower window?)

Continuing on from my previous post:

However, this only works for the Heading element directly following a Section element. Back to the drawing board 😞

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