|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Product Review Adobe FrameMaker 7.1
Powerful capabilities for working with XML documents
By: Brian Barbash
Dec. 2, 2004 12:00 AM
XML's surface-level simplicity hides a deceptively complex beast. At first glance, creating an XML document does not take a lot of effort. Create some tags, ensure they are well-formed, and that's it. Throw in a DTD or Schema and now there are a set of rules against which the document can be validated. There is an innumerable amount of XML documents created in the world today in this manner. And for many scenarios, this is a perfectly reasonable approach. But XML is so much more than that. Among other things, XML promises and delivers the separation of many concerns. The rules governing the structure of a document may be separated from the document; a document's presentation and formatting information may be independent of its content; and XML documents are not tied to any single platform. These are but a few of the benefits of the technology. However, fully realizing these benefits can become extremely complicated. Take content and presentation separation as an example. In many ways, XSL Stylesheets achieve this goal. However, they can quickly grow to contain complex and convoluted logic even for relatively simple formats. Achieving the results worthy of professional publications, including image manipulation, cross-references within documents with large volumes of text can be all but impossible. This is where Adobe FrameMaker 7.1 steps in. FrameMaker is an authoring and publishing solution that brings the benefits of XML to the publishing world. Incorporated into its standard feature set is the ability to author and publish content based on the structured data within an XML document, while maintaining the business rules associated with the content of the document. For the purposes of this review, only the XML components of FrameMaker will be addressed. Working with Structured Documents
Figure 1 shows an example of the structured FrameMaker environment. Pictured is the setup for this article. (Note: In the interest of full disclosure, this article was authored in both MS Word and Adobe FrameMaker. However, it was submitted to the magazine's editors in Word format.) Visible in the left portion of the screen is the EDD for the document. In it appears the FrameMaker element names, the subelements that are valid for each, the cardinality for the occurrence of each, and the relevant text formatting rules. In the middle of the window is the text of this article as it appears after all formatting rules have been applied. The top half of the right side of the image shows the XML hierarchy of the article itself; the raw XML of which is shown in Listing 1. The bottom half acts as a contextual guide listing what elements are available for placement into the document at the current insertion point. Writing This Article
For the purposes of writing this article, I have created a simple DTD that supports the desired structure. As a result, I've created a new application definition that references the DTD. The second part of the process is to define the read/write rules for the XML document. Read/write rules act as a kind of XSL Stylesheet to translate the elements of an XML instance document to the elements of FrameMaker. Read/write rules may also be used to define how attributes are assigned to elements. For example, the DTD for this article includes a graphic element for figures. Assigned to it is an attribute that contains the type of image used and the allowable values: JPEG, SVG, GIF, and so forth. FrameMaker presents this attribute to the user in the form of a dialog box with a drop-down menu containing the predefined enumerated attribute values. Finally, the third part of the process is to create the transformation and formatting rules. This document also acts as a kind of stylesheet. However, it deals with the resulting FrameMaker elements after they have been converted via the read/write rules. In it, all the formatting rules and special handling rules necessary for the document's elements are defined to reach the formatted result. The example created for this article is very simple. As seen in Figure 1, it assigns some basic formatting properties to the article's title, section headings, and body content. Because this rule document is independent of the XML content, any number of variations may be created and applied easily for different results. All of the characteristics available to a FrameMaker element may be accessed in this document. Therefore, it gives users access to the full suite of the tool's standard authoring and publishing capabilities. Once all of the setup is complete, it is just a matter of entering or importing the content into the appropriate sections of the document. As data is entered, all formatting and structural rules for the presentation of the content are applied, while the integrity of the DTD and read/write rules are checked and maintained on the fly. Adobe Systems Incorporated Summary Reader Feedback: Page 1 of 1
SOA World Latest Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||