Skip to main content
October 6, 2010
Question

Populating Framemaker structured templates

  • October 6, 2010
  • 1 reply
  • 1269 views

Presently utilizing Framemaker+SGML 7.2 environment, along with version 7.1 of the FDK.  Our organization has a group of users that utilize templates to input structured information to generate validated SGML, specific to DTDs, that is then used as input to generate a number of other formats XML, HTML, KML.

My question is, presently all the information is manually keystroked into the templated SGML elements.  There are external resources that I have available that could enable prepopulation of the templates with information, and eliminate much of the manual input--very labor intensive.  This could speed up input and accuracy. These sources include:

  • Unstructured Microsoft word documents.
  • Sybase database.
  • Web service requests that could provide me an XML instance.
  • XML fragments.

Are there any FDK resources available that would enable me to utilize this external information so that I can assist our users with prepopulating our templates?  There is currently a stigma attached with Framemaker in our production environment.  The markup of the information is the bottleneck.  If not, would upgrading to version 9.0 provide any capability to resolve this issue?

If there are any of these resources available, can you direct me to examples or provide code fragment examples.  I am not a native C programmer.

This topic has been closed for replies.

1 reply

Michael_Müller-Hillebrand
Legend
October 6, 2010

Pony Boy,

As long as you get source information in XML format you are lucky, because FrameMaker 7.2 supports XSL preprocessing. This has nothing to do with the FDK, it is configured in the structapps.fm. One would have to write an XSL script which modifies/prepares the source data structure in a way that is suitable for digesting by your existing structure application. [This assumes that your current application can open XML/SGML files.] There may be some restrictions between XML and or SGML, but inside FrameMaker they are interchangeable.

I use this to preprocess database output in XML so that it can be published in a different structure. The user opens the original XML file, through the structapps setting the XSL transformation kicks in and FrameMaker opens the transformed result. Works great!

XSL allows you to change element names, reorder elements, exclude certain elements. If you need, you could totally restructure the content, and the performance is usually very good. It is always faster than the time FrameMaker needs to create the pages.

If you can provide an XML sample and a description of your structure we could give some tips.

- Michael

Legend
October 7, 2010

Pony Boy,

I think I'm generally in agreement with Michael. You can probably find a way to programmatically hook into these other applications; however, it might be best to convert them to XML first, then import to FM. The reason is that FM can read XML natively. With that, you can either:

- Use stylesheets as Michael suggests to format the content for publication, or

- Use the FDK (or FrameScript) to pick out pieces of the XML content and stick it into another document (which sounds a lot like what you want)

I do the latter all the time and can attest that it is very straightforward, once you have some basic FDK skills. The XML markup makes for a very logical roadmap through the content that you can parse with code.

So in summary, just guessing based on your description, I think I'd tackle this as follows:

- Settle on a common XML structure and get the third-party apps to output it. For example, get Word to generate some XML for you, which may not be simple but would probably be easier than trying to parse Word files in FM.

- Build a structure app to import the XML to FM. In actuality, you may not need any structure app at all if you are importing it solely for the purpose of populating other docs (with the FDK). This is something else I take advantage of frequently... the ability to import raw XML and transfer the content to another template. It doesn't look like anything when it comes in, but as soon as the content is inserted into a working template with an operational EDD, it suddenly becomes formated according to the respective EDD rules.

- Build an FDK client to do the transfer. The nature of this client would depend on the nature of content to transfer and the type of markup you are using. There may be third-party tools that can assist you with this effort.

I'd be interested to hear your thoughts about that. I can post sample code that deals with the transfer of content from one FM file to another. I woiuldn't be able to comment further on getting third-party app data into XML, though.

Russ

October 21, 2010

Hello Russ,

Sorry it's taken so long to respond. Ive been trying to understand how XSL would be integrated into my application.  From what I have found from an example, it looks like the import of an external xml file would be an entire instance transformed into my sgml defined dtd.  What I am referring to would be a fragment of my sgml dtd.

For example, I may have a Framemaker defined sgml dtd DOCTYPE report, that contains the standard elements of a report-- titles, sections, head, para, footnotes, sources, etc., everything you would find in a report.  Well, I have the access to an external xml file that would just contain all of the sources that make up sourcing part of my Framemaker sgml report coming from a foreign applicaelement definitions, and automatically format the WYSIWYG of the Framemaker+SGML template.  Then when my report has been completed, I can save my sgml using my sgml application.  All of my sourcing elements automatically included.

Is Framemaker+SGML 7.2 capable of doing this through XSL or the FDK?  If so, can you direct me to any relevant examples or provide any code snippets that would be helpful?

Thanks for your help and time.