Skip to main content
Participant
July 1, 2008
Question

Invoking Boilerplate Text Entities in Structured Flow

  • July 1, 2008
  • 2 replies
  • 902 views
After sighing deeply and hoping that someone more experienced than I can help me out, here we go.

I am working with structured FM8 on an XP machine, and am a newbie with FM, so barney level responses are appreciated.

I am currently developing a military work package type technical manual built on V3.19 of MIL-STD-40051 production.dtd. This dtd references 12 external entity (*.ent) files by PUBLIC Identifier and SYSTEM Identifier. The .ent files contain numerous standardized boilerplate entities of structure and text for use in the destination publication.

In setting up the structapp file, I included the DTD element as a child of the XML Application, as:
DTD: production.dtd

Then I set each of the .ent file references into the Entities child this way:
Public ID: -//USA-DOD//ENTITIES MIL-STD-2361 GIM Boilerplate REV 3.19a 20071218//EN
Filename: boilerplate/gimboil.ent

So far, I think I have everything set up correctly, so on to what my basic question is.

How do I get the structure and content of the available entities within the .ent files to load and display in the structured flow of my FM document?

Steve Kamps
This topic has been closed for replies.

2 replies

Participant
August 5, 2008
Lynne,<br /> I tried the process you described, but something isn't happening the way I expect it to. When I import the file, it imports everything in the file, including all the comments and markup as text. I can't figure out how to specify the specific entity I need to use in the Frame document.<br /><br />Let me expand on my original post and see if that can help clarify matters somewhat.<br /><br />As I noted in my original post, I am working with a military XML DTD for technical manual development. In addition to the DTD, there are 12 external files containing entities required in the development of the manual. Each file contains multiple entities and these entities vary in length and complexity from simple text statements to literally hundreds of lines of markup and text.<br /><br />1. Each of the 12 external files is declared in the DTD this way:<br /><br />!ENTITY % prod_boilerplate PUBLIC "-//USA-DOD//ENTITIES MIL-STD-2361 2361 PRODUCTION Boilerplate REV 3.21 20080716//EN" "boilerplate/prodboil.ent"<br />%prod_boilerplate;<br /><br />2. I listed each of these files in the structapps.fm file using the ENTITIES element with child PUBLIC element, for example:<br /><br />Entity locations<br /> Public ID: -//USA-DOD//ENTITIES MIL-STD-2361 2361 PRODUCTION Boilerplate REV 3.21 20080716//EN<br /> Filename: boilerplate/prodboil.ent<br /><br />3. As an example, here is the verbatim text from one of the entities in the prodboil.ent file referenced in the example above.<br /><br />!ENTITY notices.dist.d.statement "<dist><d.statement><title>DISTRIBUTION STATEMENT D.</title><text>Distribution authorized to the Department of Defense and U.S. DoD contractors only for </text>&notices.dist.determined-reason;<text>, as determined on </text>&notices.dist.determined-date;<text>. Other requests for this document shall be referred to </text>&notices.dist.determined-dod-office;<text>.</text></d.statement></dist>"<br /><br />As you can see, the entity contains markup information and nested entities, which are defined in other documents in the set of 12.<br /><br />This is where I start beating my head on the wall, hence my questions.<br /><br />a. Chapter 21 of the FM Developers Guide leads me to believe that FM treats each entity as a text inset and that if the inset contains markup, that the markup will be added to the structure of the document at the point of insertion. To that end, do I write a rule for each entity that I need to use? For example:<br /><br />entity "notices.dist.d.statement" {<br /> is fm text inset;<br /> reformat using target document catalogs;<br /> }<br /><br />b. The Dev Guide and Dev Reference repeatedly mention the Entity Declarations reference page. Is this part of the template file reference page set? If so, how do I use it to map these entities?<br /><br />c. If I have followed the correct process to this point in identifying these entities to the software, how do I get the entity into a structured FM document?<br /><br />Thanks for your assistance.<br /><br />-Steve
Inspiring
July 3, 2008
Steve,

If I understand your question correctly, you are asking how to insert boilerplate content into an FM document, when each piece of boilerplate content is stored in a distinct file as a fragment of an XML document. To do so, create what's called an XML text inset:

  1. Set an insertion point where you want one of the entities to appear
  2. Use File > Import > File to bring up the Import browser
  3. Make sure the Import by Reference radio button at the bottom of the browser remains selected
  4. Select the file you want to insert
  5. Click Import
  6. Complete any subordinate dialog boxes and prompts that appear

The result is a text inset, that is, content from a different file (or FM flow) inserted into an FM document. Text insets can reference content in any text format that FM can read (other FM documents, plain text, XML, SGML, Word, RTF, etc.). This one, of course, is XML. When you save the FM document as XML, FM creates an entity reference for each XML text inset.

--Lynne