Thread View: adobe.framemaker.sgml
5 messages
5 total messages
Started by Alex_Masycheff
Wed, 15 Oct 2008 12:45
Defining Frame Below for Nested Elements
Author: Alex_Masycheff
Date: Wed, 15 Oct 2008 12:45
Date: Wed, 15 Oct 2008 12:45
59 lines
2176 bytes
2176 bytes
Hi All,
I have the element called <steps>. This element can contain one or more elements, called <step>. In the EDD, I define for <steps>:
In all contexts.
Advanced properties
Frame below element: Step Rule
This adds a horizontal line after the last <step>.
Now, <step> can contain the element called <info>, which can contain <note>. For <note>, I define in the EDD:
In all contexts.
Advanced properties
Frame above element: Note Rule
Advanced properties
Frame below element: Note Rule
This adds a horizontal line before and after the note. Everything works perfect if I have a structure like this:
<steps>
<step>
<cmd>Open a file</cmd>
<info>
<note>Note goes here </note>
</info>
</step>
<step>
<cmd>Do something...</cmd>
</step>
</steps>
However, if <note> is the last element in the last step:
<steps>
<step>
<cmd>Open a file</cmd>
</step>
<step>
<cmd>Do something...</cmd>
<info>
<note>Note goes here </note>
</info>
</step>
</steps>
...then the horizontal line for the note (Note Rule) appears, but the horizontal line for the last step (Step Rule) doesn't appear.
As far as I understand, it happens because settings for the last element in the <note> override the settings for the last element in the </steps> At least, when I remove the definition for Note Rule, then the Step Rule appears.
Is it a right assumption? Is there anything to do to make Note Rule to appear if the note is the last element in the last step?
Thanks in advance,
Alex
Re: Defining Frame Below for Nested Elements
Author: Russ Ward
Date: Wed, 15 Oct 2008 16:27
Date: Wed, 15 Oct 2008 16:27
9 lines
1495 bytes
1495 bytes
Hi Alex, The way I read this, I think you are attempting to assign conflicting properties to the same paragraph. A paragraph can only put a single frame above or below a paragraph, so it isn't possible for you to get both frames at the end of your steps, at least not as properties of the same paragraph (ie, whatever paragraph falls at the end of the step element. It is as you say, the last applied rule "wins," and in this case, it has no choice but to reverse the property applied by an ancestor rule. Given the nesting of these elements, I'm not coming up with any way to do it with your existing structure. Would it be possible to define a separate element like "line" or "hr" or something that applies it's own paragraph and frame? Maybe somebody else can come up with a clever workaround. Russ
Re: Defining Frame Below for Nested Elements
Author: Alex_Masycheff
Date: Thu, 16 Oct 2008 10:11
Date: Thu, 16 Oct 2008 10:11
8 lines
1273 bytes
1273 bytes
Hi Russ, Thank you. At least now I have an intelligent confirmation of my suspicions :-) I can define a separate element for the horizontal line, but that's what I wanted to avoid. My initial idea was to make the line added automatically based on the context in which the element appears. So a user wouldn't have to do it manually. And it worked fine until I got to the situation when the note appeared as the last element in the last step... Anyway, I think I'll go with your suggestion. It looks like an easiest and fastest solution. Again, thank you, Alex
Re: Defining Frame Below for Nested Elements
Author: Jon_White
Date: Thu, 16 Oct 2008 19:35
Date: Thu, 16 Oct 2008 19:35
74 lines
2599 bytes
2599 bytes
Hi Alex, This is a case where you might consider the use of a prefix and suffix on your Steps element. If you define your <Steps> element to have a prefix and suffix consisting of just a space character, it will format with a paragraph at the start and the end of the element, and you can use a First Paragraph Rule and a Last Paragraph Rule to define a frame above and a frame below, which will appear before and after the element. This will work in conjunction with your <Note> to display a Note Line below the <Note> and also the Step Rule at the end of the Step. I think that the following element definitions will do what you want. The First Paragraph and Last Paragraph rules on <Steps> are there to minimise any extra space taken up. EDD Version is 7.0 Automatically create formats on import. Element (Container): Steps General rule: Step+ Valid as the highest-level element. Prefix rules In all contexts. Prefix: Suffix rules In all contexts. Suffix: Format rules for first paragraph in element In all contexts. Default font properties Size: 2 pt Basic properties Paragraph spacing Space above: 0 Space below: 0 Line spacing Height: 0 Advanced properties Frame above element: Step Rule Format rules for last paragraph in element In all contexts. Default font properties Size: 2 pt Basic properties Paragraph spacing Space above: 0 Space below: 0 Line spacing Height: 0 Advanced properties Frame below element: Step Rule Element (Container): Step General rule: (Cmd | Info )+ Element (Container): Cmd General rule: <TEXT> Element (Container): Info General rule: Note+ Element (Container): Note General rule: <TEXT> Format rules for first paragraph in element In all contexts. Numbering properties Autonumber format: Note: Text format rules In all contexts. Advanced properties Frame above: Note Rule Frame below: Note Rule
Re: Defining Frame Below for Nested Elements
Author: Alex_Masycheff
Date: Sun, 19 Oct 2008 10:29
Date: Sun, 19 Oct 2008 10:29
6 lines
800 bytes
800 bytes
Hi Jon, Sounds interesting... Let me try and I'll let you know a result... Thanks! Alex
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads