Exploring the XML roundtrip in Adobe FrameMaker 8.0

This tutorial demonstrates the new enhanced XML roundtrip function in FrameMaker 8.0. You can now roundtrip comments from an XML file and back, and preserve XML comments as markers in FrameMaker 8.0. This tutorial also demonstrates how you can integrate formatting from a Cascading Style Sheet (CSS) to an Element Definition Document (EDD). This is very valuable for new users who might find it difficult to create formatting rules in EDD. Moreover, you will learn more about the new XML templates.

Requirements

To follow along with this article, you need this software:

Prerequisite knowledge:

XML Roundtripping

In FrameMaker 8.0, you are now able to roundtrip comments from XML to FrameMaker markers and back again. It is also possible to create new comments via FrameMaker markers.

  1. Open the L01_structured_comment.xml file with a text editor. Note the line: (see Figure 1)
  2. <!--This is a comment before the text element-->

    Image 1

    Figure 1: Note the comment line.

  3. Close the text editor.
  4. In FrameMaker, choose File > Open and choose the L01_structured_comment.xml file. Click Open.
  5. The Use Structured Application dialog box appears.

  6. Select Demo and click Continue.
  7. As you can see, a marker is displayed after the sentence “In this lesson you will learn how to do the following”. Comment elements in XML files are displayed as markers in FrameMaker 8.0. (See Figure 2)

    Image 2

    Figure 2: Comment elements in XML files are displayed as markers in FrameMaker 8.0.

  8. Choose Special > Marker.
  9. This opens up the Marker dialog box, and you can see the Marker information, that is the line you viewed in the text editor: (See Figure 3)

    “This is a comment before the text element”.

    Image 3

    Figure 3: The comment is displayed in the Marker Text window.

  10. Go to the Marker Text input field and edit the text. Add the words: “with some additions”.
  11. Click the Edit Marker button.
  12. Choose File > Save as XML...
  13. Rename the file L01_structured_comment1.xml and click Save.
  14. Close the file in FrameMaker.
  15. Now open the edited XML file L01_structured_comment1.xml with a text editor.
  16. Scroll down in the document and note that the comment you edited in the FrameMaker Marker dialog box has changed accordingly. (See Figure 4)

    Image 4

    Figure 4: The comment has changed in the XML document.

How to import CSS to EDD in Adobe FrameMaker 8.0

  1. In FrameMaker 8.0, choose File > Open and select the edd.fm file. Click Open.
  2. This is an EDD equipped with elements and attributes. But as you can see, the text is not formatted. There is also a corresponding document built with the EDD.

  3. Choose File > Open and select the file example.fm. Click Open.
  4. This is the corresponding document. This document also lacks formatting. (See Figure 5).

    Image 5

    Figure 5: The example document is not formatted.

    You can now go to the EDD and import a CSS.

  5. To do this, choose Structure Tools > Import CSS Styles from the main menu.
  6. Select the file format.css. Click Open.
  7. This opens up the Use Structured Application dialog box.

  8. Choose No application in the drop down menu. Click Continue.
  9. The Select type dialog box appears.

  10. Click the XML button to choose to import files for XML. Click OK.
  11. The CSS text rules appear in the EDD document (see Figure 6).

    Image 6

    Figure 6: The CSS text rules appear in the EDD document.

    You are now able to import this improved EDD.

  12. Select the file "example.fm" and choose File > Import Elements Definitions.
  13. The Import Elements Definitions dialog box appears.

  14. Go to the drop down menu Import from document and choose to import from the document edd.fm.
  15. Check the Format Rule Overrides square, and click the Import button.(See Figure 7)
  16. Image 7

    Figure 7: The Import Element Definitions dialog.

    As you can see, all the imported styles are now applied to the document. (See Figure 8)

    Image 8

    Figure 8: The example document is now formatted.

    In FrameMaker 8.0 it is also possible to import formatting from a CSS file to an XML file. When you open an XML file that is associated with style sheets, FrameMaker reads the style sheet and generates a temporary template for opening the XML file.

Using the new XML templates

FrameMaker 8.0 offers several new XML Templates for you to use.

  1. Choose File > Open > New Document...
  2. Navigate to the XML_Templates folder.
  3. The XML_Templates folder contains several XML Templates. You can for instance create a FrameMaker xDocBook document by using the xDocBook template.

    For now we will work with the Template Report.xml.

  4. Select the Report.xml template. Click Open.
  5. The Use Structured Application dialog opens. You now have three different applications to choose from.

  6. Choose the ReportSidehead application. Click Continue.
  7. You are now ready to start your work.

Where to go from here

For more information and additional tutorials, visit the Adobe Design Center.