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

prerequisite structure for prefixes

Advisor ,
May 13, 2008 May 13, 2008
b Extract from my xml source as it stands<br /><pre><br /><fmisProcess><br /><intro><br /><shortDesc>This process covers updating door records (in the FMIS database) when new shape files are issued for a floor. The documentation is based on the UML notation and documentation.</shortDesc><br /><context>When doors are modified (because of non-conformance or the creation of a new building) the technical drawings (CAD) are published as shape files. As part of the modification process, the FMIS database must also be updated.</context><br /><role>This task is performed by the "Doors" theme processing manager.</role><br /><model><br /><para>This use case describes how to update the FMIS database using the new shape file lokaal.shp</para><br /><graphic image="doorModel" alt="model for process Door"/><br /></model><br /></intro><br /></fmisProcess><br /></pre><br />b Extract from my EDD as it stands<br /><pre><br />Element (Container): shortDesc<br />General rule: <TEXT><br />Text format rules<br />Element paragraph format: p<br /></pre><br />b Question<br /><br />I'd like to add a prefix paragraph, let's say for example a heading "Role" before the element <role>. No luck so far; best I've achieved (briefly) was prefixing "Role" as the first word in the role paragraph and applying a heading format to the whole lot. Hints and tips?<br /><br />b Sub-question<br /><br />Do I need to go one level deeper with structure and refer to an element <para> rather than <TEXT> in my General Rule?<br /><br />Thanks in advance! (and apologies for any over-formatting; you'll appreciate that the intention was just to make things clearer ...)
TOPICS
Structured
1.3K
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
Contributor ,
May 13, 2008 May 13, 2008
Hi,

Prefixes and suffixes are meant to be "inline" text for a paragraph-type element in frame, they don't work like paragraphs. It is possible to add a line break (backslash+n in prefix string) to prefix that would make it to appear in it's own line and use prefix->textrangeformatting in edd to format the prefix string.

Another way is to Frame's "Frame above paragraph" formatting feature to add an anchored frame above with proper text content for role-element. This would allow you to "tune" the vertical distance between prefix text and it's siblings (when using line break, it is controlled by style's line spacing only).

Third one is to (if you can play with the dtd) is to allow role to have para as child. Then you could use role as a para with static prefix text and have formatting control for prefix text.

Hope this helps,
Martti
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 ,
May 14, 2008 May 14, 2008
Niels,


As Martti explains, a prefix appears in the same FrameMaker paragraph as the element it prefixes. However, if that element begins with a child element that is in a separate paragraph, the prefix will appear in a paragraph of its own. The answer to your "sub-question" hence is yes, put the content of the role in a para so that the prefix of the role will be in a different paragraph than that of the para. By the way, you can format that prefix para with FirstParagraphRules for the role element.


Remember, though, that you can specify font properties for a prefix and include line breaks within it (indicate a forced return with \n or \r). Unless the prefix paragraph differs from the role paragraph other than in font properties, you can get by with a text-range prefix.

--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
Contributor ,
May 14, 2008 May 14, 2008
Hi Lynne,

Good point, I didn't know the child/separate para thing with prefixes (one learns every day).

BR, Martti
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 ,
May 14, 2008 May 14, 2008
It's about as hard to document as riding a bicycle, but every bit as satisfying when it works <g>
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 ,
May 17, 2008 May 17, 2008
LATEST
Martti,


Yes, there is always more to learn!


As far as prefixes go, consider situations such as a Chapter that starts with a Paragraph or a List that starts with an Item that starts with a Paragraph. Even though all these containers map to FM paragraphs rather than to text ranges, it is clearly undesirable to have each of them start a new paragraph. Instead, when FM encounters an element that is mapped to a paragraph, it checks to see whether there is content in the current paragraph. If so, it starts a new paragraph, if not, the new element goes into the existing paragraph. Thus, a BlockQuote element at the start of a Paragraph will not cause a paragraph break, but a BlockQuote element after some data characters will. Prefixes, like data characters, variables, and text-range elements are considered content, so a child element following a prefix will cause a paragraph break unless the child element is a text-range.


You can take advantage of this behavior to force paragraph breaks by defining a prefix that is simply a space. For example, suppose a Chapter starts with a Title, but you want an empty paragraph with an autonumber that specifies a chapter number preceding the Title, something like:


Chapter I

Introduction

where the two paragraphs have different paragraph formats.


You can give the Chapter a prefix of a space; since the space is content in the first paragraph in the Chapter, the Title will cause a paragraph break. Then you can use a FirstParagraphRule to format the chapter number and a TextFormatRule for Title to format the chapter title.

Of course, paragraph breaks preceding a suffix are created analogously.

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