Getting started with structured applications

Learn how to get started with structured applications, the significance of formatting in the structured application

In unstructured FrameMaker, setting up an authoring environment requires only a template file. The template file defines the formats and the styles and a style guide defines how to work correctly with the template. In structured FrameMaker, you require more than just a structured template.

To establish a basic structured authoring environment in FrameMaker, you require an EDD or a DTD. You can create custom EDDs and DTDs or use off-the-shelf EDDs and DTDs. Additionally, you need to link the element definitions with formatting information. You can link elements in the EDD to formatting in three ways:

Formatting template

You can assign formatting based on the various tags (paragraph tags, character tags, and so on) in a template. If you already have a formatting template, you can reuse information in that template.

Format change lists

You can create named formatting definitions in the EDD. The format change lists let you provide partial formatting specifications and inherit the rest from a few base paragraph tags. You can reuse format change lists for related elements.

Embedded formatting

You can specify formatting by writing the formatting into each element definition.

After you create the EDD and the formatting, you combine the two components to create a single structured template. To create the structured template, you open the formatting template and import element definitions (File > Import > Element Definitions) from the EDD. The resulting file is your structured template.

Apart from the EDD and the structured template, you also need:

read/write rules

The read/write rules control translation from FrameMaker structure to XML and back. Specifically, read/write rules help manage table translation and other complex formatting.

Structured application

The structured application lists all of the component files in your structure implementation and provides configuration information. For example, you can use the structured application to specify whether and how to export conditional text tagging.

Structured templates

All FrameMaker structured applications require a structured template. Structured FrameMaker templates contain definitions of all the elements that can be used in the document as well as the document’s page layout and formatting.

Structured templates are like unstructured templates with the most obvious difference being the Elements catalog.

The Elements catalog displays the element definitions defined in the EDD. To create a structured document as a first step, you import the definitions from either an EDD or a DTD. The element definitions in an EDD or DTD are populated in the Elements catalog. You use the Elements catalog to insert valid elements in your document and build a structure that complies with the rules in the EDD.

Content analysis

The term content analysis describes a process in which you review existing documents to understand how they are designed and what implicit structure they contain. Begin your analysis by making a list of the documents your organization produces. Your list might include user guides, reference guides, white papers, tutorials, training manuals, and online help. Make a list of the major components for each document type. For each component, list whether the item is required, optional, and how often it occurs in that document. The following table shows a high-level analysis for a book:

Component

Requirement

Occurrence

Front matter

Mandatory

1

Table of contents

Mandatory

1

Preface

Optional

0 or 1

Chapter

Mandatory

2 or more

Appendix

Optional

0 or more

Glossary

Optional

0 or 1

Index

Mandatory

1

For major components, such as lessons (for training manuals) or chapters (for books), work your way down the document hierarchy into smaller and smaller chunks, until you reach the bottom level of the hierarchy.

You must do a content analysis for every document type you want to create in your structured environment. Once you have developed a content model for each document, you can look for opportunities to refine the model and reuse names. For example, suppose that a Help deliverable consists of topics and the chapters in a book also consist of topics. If you create a Topic element that is usable for both printed and online materials, you can minimize the number of elements in your structure definition and perhaps reuse information in both output formats.

Printed Topic

Online Topic

Combined Topic

Topic

Topic

Topic

Title

Title

Title

Para

Para

Para

Steps

Steps

Steps

Can contain Para, List, Table, Graphic, Note

Can contain Para, List, Table

Can contain Para, List, Table, Graphic, Note

RelatedTopics

RelatedTopics

It’s unlikely that your documents are perfectly consistent. You need to decide whether to create a structure that is loose (allowing many variations) or strict (very few variations are permitted). You will have problems at both ends of the spectrum:

It’s very difficult to find the right balance between these two extremes. One approach is to allow variations only where they add value.

Note: A similar problem occurs when creating unstructured FrameMaker templates. You want to minimize the number of tags that must be maintained while providing all of the tags that are needed to create your content.

Once the analysis is complete, you can decide whether to use an existing structure or to build your own. Numerous XML implementations are available; DocBook and the Darwin Information Typing Architecture (DITA) are specifications used for technical documentation. Standard structures are also defined for military documents (mil-specs or mil-standards), aircraft maintenance manuals, and others. The following table describes some of the factors that influence whether you will use a standard specification or build your own structure.

Use a standard

Build your own

You are required to deliver content that follows the standard. For example, many U.S. military contractors are required to deliver documentation that follows a published standard

You want to create a structure that matches your content analysis precisely.

Your content requirements closely match an existing structure. You only need to make minimal changes to the standard structure.

Your content analysis indicates that your information does not match existing structures very well.

You do not want to spend a significant amount of time building a structure, and you are willing to change the organization of your content to fit it into an existing structure.

The structure needs to match the content precisely.

A longer implementation period is an acceptable cost to ensure you can build exactly what you need

You do not have the technical expertise or resources available to build your own structure.

You have resources available, whether in-house or as consultants, who can build the structure.

Elements

The basic building blocks of structured documents are elements. Elements represent pieces of a document's content (its text, graphics, and so on) and together make up the document's structure. Elements can be simple elements or complex elements.

A simple element in XML contains just text. A complex element can have attributes and can:

Elements can have values within a specified range of valid values.

All structured documents in FrameMaker use elements. Each element has a name, or tag, such as <section>, <title>, or <p>. The element tags that are available are determined by the document element definitions.

Attributes

Attributes supply additional information about an element. For example, the DTD designer for a manual could use an attribute called version for its book element to allow the user to specify a book’s revision status. In FrameMaker, the attributes for an element are a part of the definition of the element itself. In XML or SGML, the attributes of an element occur separately in an attribute definition list declaration (ATTLIST) in the DTD.

Attributes can have a default value or a fixed value. Attributes can also be either mandatory or optional. For example, if you have a topic element, the topic ID could be a mandatory attribute for topics being cross-referenced. You can also have value ranges for attributes or enumerate the legal values for an attribute.

Element rules

Following seven rules control how the elements are used in terms of their sequence, number of occurrences, and group.

All

Indicates that child elements can appear in any sequence but must appear at least once.

Choice

Indicates one or the other child element can occur.

Sequence

Indicates the order in which the child elements appear.

minOccurs

Indicates the minimum number of times a child element can occur.

maxOccurs

Indicates the maximum number of times a child element can occur.

Element Groups

Elements can be grouped under a group declaration.

Attribute Groups

Attributes can be grouped under an attributeGroup declaration.

XML schema

An XML schema defines the legal building blocks of an XML document. Unlike the EDD, DTDs and schema files do not provide formatting information.

XML schemas define the following:

XML namespace

XML namespaces allow the same document to contain XML elements and attributes taken from different vocabularies, without naming collisions.

Opening or importing a schema

You can import an XML document that references a schema file, and you can specify a schema file in your structure application to use for validating a document upon export to XML.

To specify a schema file for use in exporting to XML, modify the structapps.fm file. The element schema, a child of the XMLApplication element, specifies the schema file path for export.

Create an EDD

Learn how to create EDD’s in FrameMaker by choosing appropriate strategy.

An EDD is a structured document. Use the structured editing features to create and edit the EDD.

The EDD contains both structural rules for the document (Document Type Definition or DTD) and styling rules, which dictate how elements of a specific type are styled. An application developer generally creates the EDD from an existing DTD file or from scratch. For more information, see the Structured Application Developer Reference guide.

Following are the basic steps to get started with structured authoring in FrameMaker.

Analyze requirements

Before building the proposal template, analyze existing proposals to identify their components. Based on this analysis, you create a content map. The proposal example results in the following sequence:

  1. Title

  2. Executive summary: Title, One paragraph

  3. Project description: Title, One or more paragraphs

  4. Cost: Title, One or more paragraphs

  5. Schedule: Title, One or more paragraphs

Note: You could probably build the EDD for this simple example without formal content analysis. For larger projects, though, content analysis is critical.

Choose an EDD strategy

You can build an EDD in multiple ways:

  • Create the entire EDD yourself.

  • Import a DTD or schema to create an EDD that contains structure definitions.

  • Use a conversion rules table to structure an existing sample document. Then create a first draft of the EDD that contains basic element definitions and formatting that matches your unstructured template.

  • Modify an existing EDD—one of the samples supplied with FrameMaker or an EDD from another source.

Build the proposal EDD

Based on the content analysis, you can now create the proposal EDD.

  1. Make sure you are in structured FrameMaker. To switch from unstructured to structured FrameMaker, select File > Preferences > General. In the Product Interface pop-up menu, select Structured FrameMaker. Close and restart FrameMaker.

  2. Select Structure > EDD > New EDD to create an EDD file. Default elements are inserted in the EDD.

    Note: The EDD is itself a structured FrameMaker document. You use the same guided editing environment to create the EDD that you use to edit other structured documents.
  3. Select Structure > Structure View to display the Structure View pod.

  4. Create the top-level <Proposal> element. Position your cursor to the right of the Tag bubble in the Structure View, and type in Proposal. As you type, the letters appear in both the Structure View and the document window.

  5. Open the Elements Catalog.

  6. In the Structure View, click to the right of the red box (which indicates that additional information is required). Notice that the contents of the Elements catalog change because of the new cursor location. In the Elements catalog, select Container and click Insert. The <Container> element and a child <GeneralRule> elements are inserted. The general rule specifies which elements are allowed inside the proposal element. During the content analysis, you identified the following: title, executive summary, project description, cost, and schedule.

  7. Type a general rule for Proposal: Title, ExecSummary, ProjectDescription, Cost, Schedule

    Note: Element names cannot contain spaces.
  8. Insert a <ValidHighestLevel> element as a sibling of the <GeneralRule> element. To do so, click underneath the <GeneralRule> element to position your cursor, click the <ValidHighestLevel> element in the Elements catalog, and then click Insert.

The <Proposal> element is complete. You must now provide definitions for each of the child elements: <ExecSummary>, <ProjectDescription>, <Schedule>, and <Cost>.

Define child elements

  1. Position your cursor at the bottom of the structure.

  2. Using the Elements catalog, insert an Element bubble. Name the element <ExecSummary>, make it a container, and specify the following as the general rule: Title, Para+

  3. Repeat step 2 to define the remaining elements. The general rules are shown in the following table:

    Element

    General Rule

    ProjectDescription

    Title, Para+

    Cost

    Title, Para+

    Schedule

    Title, Para+

    Title

    <TEXT>

    (Type the word TEXT with angle brackets around it.)

    Para

    <TEXT>

    (Type the word TEXT with angle brackets around it.)

  4. Save your EDD file as proposal_EDD.fm.

Add formatting to the EDD

You have now built an EDD that provides the structure for a simple proposal. However, when you type content, no formatting is applied.

The following section describes how to provide formatting, and how to automatically insert the correct text for the various titles. By default, text uses the Body paragraph tag.

Change the Body tag definition

  1. In structured_proposal.fm, select Format > Paragraphs > Paragraph Designer and change the default definitions of the Body and Heading1 paragraph tags. For example, change the font or place a line above the Heading1. To make your changes obvious, you may also want to assign unique colors to the two tags.

  2. In proposal_EDD.fm, modify the <Para> element definition to include a formatting rule. To specify that <Para> should always use the Body paragraph tag, click under the <GeneralRule> element, add a <TextFormatRules> element, and then add an <ElementPgfFormatTag> element. Type Body as the text for the <ElementPgfFormatTag> element.

    For the <Title> element, you need more complex formatting rules. <Title> should automatically display section titles, such as Executive Summary, Project Description, and so on. You must write a context rule that specifies what text to display for each type of heading, and specify that <Title> uses the Heading1 paragraph tag.

  3. In proposal_EDD.fm, modify the <Title> element definition to use the Heading1 paragraph tag. Add the same <TextFormatRules> and <ElementPgfFormatTag> elements as you did for the <Para> element.

    Note: Like the paragraph tags, the information you enter is case-sensitive and space-sensitive. For example, “Heading1” is not the same as “heading1” or “Heading 1.”

Next, add a prefix rule to the <Title> element. Prefix rules let you specify text that should appear at the beginning of the element. Based on the Title’s position, you’ll specify which text should be displayed.

Add a prefix rule

  1. Position your cursor in the <Title> element to insert a child of <Container> after <TextFormatRules>.

  2. Insert a <PrefixRules> element.

  3. Insert a <ContextRule> element. The <If> and <Specification> elements are inserted automatically. For the <Specification> text, type ExecSummary.

  4. Position your cursor underneath the Specification element and insert a Prefix element.

  5. For the Prefix element text, type: Executive Summary

  6. Repeat steps 3–5 for the other elements that need titles—<ProjectDescription>, <Schedule>, and <Cost>—and insert the appropriate text for each prefix.

Test the results

  1. Save the EDD.

  2. Import the element definitions into your structured_proposal.fm file to test the results. Each section should display the title text you’ve specified.

Test the EDD

To test the EDD, you import it into a document and then verify that you can create the structure you expect. At this point, the document does not have any formatting, but you can still verify the structure.

  1. Create a new, blank, portrait document by selecting File > New > Document, and then click Portrait.

  2. Make sure that the EDD and the new document file are both open. From the new document, select File > Import > Element Definitions. In the Import from Document pop-up menu, select the proposal_EDD.fm file and click Import.

    Note: If your EDD is not displayed in the list, make sure that the EDD file is open and that you have saved it. Until you save a document, it is not available in this list.

    The structure definitions in your EDD are imported into the blank document. To verify that the definitions were imported, position your cursor in the main text flow and then display the Elements catalog. You should see the <Proposal> element.

  3. Insert a <Proposal> element. The <Title> element, which is required as the first child of <Proposal>, should now appear in the Elements catalog.

  4. Insert the <Title> element. Continue inserting elements until your proposal structure is complete.

    Note: If your structure is incorrect, go back to your EDD, correct it, and then re­import the element definitions. You can also check your EDD against the online proposal_edd, which is available at the Adobe website, www.adobe.com/go/lr_FrameMaker_support_en.
  5. Save your file as structured_proposal.fm.

Create a DTD from an EDD

Learn how to create a Document Type Definitions from an EDD in FrameMaker.

DTDs or Document Type Definitions define the elements that you can include in a structured document. It defines the elements, their attributes, order of elements and what elements can contain other elements.

  1. Open the EDD.

  2. Add the <StructuredApplication> element, then type in the name of the XML application that you created in the previous section.

  3. Select Structure > DTD > Save as DTD.

  4. Enter a filename. Ensure that you specify the .dtd extension.

    If your EDD is valid, you should not see an error log. However, it is possible to build SGML style General rules in FrameMaker that are not permitted in XML.

  5. A message dialog box provides you with information that FrameMaker has finished writing the DTD.

  6. Open the DTD. If you have not specified the <StructuredApplication> in step 2, you can select it from the Use Structured Application dialog box that is displayed.

The DTD is now ready to be used.

Build a structured application

Learn how you can build a structured application in FrameMaker.

To enable XML import and export for structured proposals, you need to set up a structured application, which lists the components of the structured authoring environment.

First, you need to create a document type definition (DTD) that matches the EDD.

Create a DTD

  1. Open the proposal_edd.fm file in structured FrameMaker.

  2. Select Structure > DTD > Save As DTD. Specify the filename (proposal.dtd) and where you want to save the file, and then click Save.

  3. In the Use Structured Application dialog box, leave the default selection, <No Application>, and click Continue.

  4. In the Select Type dialog box, select XML and then click OK. The DTD file is written out to the location you specified.

You also need a structured template that contains formatting and EDD information.

Create a structured template

  1. Open the structured_proposal.fm file.

  2. Delete all content from the file. A structured template must be empty.

  3. Save the file as proposal_template.fm.

Now, you are ready to configure the structured application.

Configure the structured application

  1. Select Structure > Application Definition > Edit Application Definitions. This command opens the structapps.fm file - in which application definitions are stored— from the following location:

    %appdata%\Adobe\FrameMaker\<version>\

    Note: Like the EDD, the application definition file is itself structured.
  2. Insert an <XMLApplication> element as a child of the <StructuredSetup> element.

  3. Type Proposal for the application name.

  4. Insert a DTD element and specify the following as the DTD element text:

      $STRUCTDIR/proposal/proposal.dtd
  5. Insert a Template element and specify the following as the Template element text:

      $STRUCTDIR/proposal/proposal_template.fm
  6. Select File > Save to save the structapps.fm file.

  7. Select Structure > Application Definition > Read Application Definitions to update FrameMaker with the new application definition.

    Note: To verify that the application is installed correctly, select Structure > Set Structured Application to display the Set Structured Application dialog box. If you set up the applications definitions correctly, Proposal appears in the drop-down list object.

Finally, you need to copy the application files into the directory where the structured application definition expects them.

Copy the application files

  1. Locate your FrameMaker installation folder using the file explorer, and navigate to the Structure\xml folder.

  2. In the xml folder, create a proposal folder.

  3. Copy the proposal.dtd and proposal_template.fm files into the proposal folder.

Build structure files

Decide whether to use an existing standard or create your own structure.

Create structure files without using an existing standard

  1. In FrameMaker, create an EDD that matches your structure requirements.

  2. Test the EDD to verify that the structure definitions are correct.

  3. Add formatting to the EDD, and test the EDD to verify that the formatting works correctly.

  4. Create a DTD from the EDD.

You now have the two structure definition files you need—one for FrameMaker (EDD) and one for XML (DTD).

Use an existing standard

  1. Obtain a copy of the standard files, and modify the provided DTD or schema file to match your requirements.

  2. Open the completed structure file in FrameMaker to create an EDD, and add formatting to the EDD.

    Note: FrameMaker includes several variations of DocBook as sample structured applications. If you plan to create DocBook-based structure, consider modifying one of the provided applications.

Once you have your structure definitions, you need to set up the structured application.

Set up the structured application

  1. Open the structapps.fm file (select Structure > Application Definition > Edit Application Definitions).

  2. Add a new application definition to the file with pointers to your EDD and DTD/schema files.

After setting up the application, you’ll want to fine-tune the import/export settings.

Using the Structured Application Designer

The Structured Application Designer allows you to create a structured application using a graphical wizard.

To launch the Structured Application Designer, click Structure > Structured Application Designer. The Structured Application Designer is displayed as follows:

Structured Application Designer
Using the Structured Application Designer in FrameMaker

  1. Select a base Application on which the new application is based. To load a new set of base applications, click Load Applications and select the relevant structured application file. The list of applications is automatically populated from the selected structured application file.

  2. Optionally, enter the DTD, the RW Rules (Read/Write Rules) file, the EDD, and the Template file, along with the DOCTYPES specifications.

  3. Enter the new Application Name.

  4. By default, the application is saved in the structapps.fm file in your application directory. To change the filename, click Save As and select or enter a new filename.

  5. Optionally, to set advanced settings, click Advanced Settings and make your desired selections.

To create a read/write Rule file, based on an existing DTD, specify the DTD and click New from the RW Rules section. The read/write Rule File Maker is then displayed.

Note: If you do not specify a DTD, an empty read/write Rule File is created. You can then add rules using the read/write Rule File Maker.
  • To update an existing read/write Rule file, select the file and click Update. Make your changes in the read/write Rule File Maker.

  • To generate a new EDD, select the DTD and click new from the EDD section. All elements are loaded in the EDD interface. From the EDD interface, you can select <Element Paragraph Format Tags> for every element.

  • Click Import Format settings to import format settings from another EDD.

  • Click Save to save your changes or Reset to roll back to the last saved state.

  • To update an EDD, select the EDD and click Update.

  • To generate a new template, select the corresponding EDD file and click New from the Template section.

Fine-tune the import/export settings

  1. Set up a read/write rules file with the necessary mappings, and set up XSL transformation files with any additional changes.

  2. Add a reference in the structured application definition to the read/write rules file and the XSL transformation files.

  3. Add any other required configuration settings, such as handling of conditional text and external cross-references, in the structured application definition.

Using the read/write Rule File Maker

FrameMaker includes a powerful read/write Rule File Maker that helps you author rules easily. This helps simplify rule generation, since you have all the settings at one place, and do not have to remember any rule syntax.

To launch the read/write Rule File Maker, choose Structure > Read/Write Rules > New Read/Write Rules. Select the Launch Rule File Maker option and click OK.

Note: Optionally, you can specify the DTD to be used when creating the rules.

The Rule File Maker dialog is displayed as follows:

Rule File Maker
Using the read/write Rule File Maker in FrameMaker

The Rule File Maker has two basic sections:

  • Import-Export Settings: These settings are applicable for the reading and writing operation.

  • Export-Only Settings: These settings are not covered in the Import-Export Settings and are only applicable for the writing operation.

The Import-Export Settings section is divided into four sections:

  1. Markup Elements: Allows editing of all markups present in the specified DTD. To see a list of all elements, select ‘select from DTD’ from the value drop-down. FrameMaker, then displays a list of elements. You can select multiple elements from the list and click OK to insert the selected elements into the read/write Rule File Maker.

  2. Global Settings: Displays the list of settings that are applied to ALL elements globally.

  3. Entities: Displays the list of all entities that are present in the DTD.

  4. Advanced Settings: Contains advanced settings for Books and Character Maps.

The Export Only Settings section is divided into three sections:

  1. FM Objects: Lists the type of FM Objects present. In addition, each FM Object category lists the markups mapped as that object. For example, if you map markup M1 to the Table FM Object in the Import-Export Settings section, the Table list in the Export Only Settings section displays the markup M1.

  2. Global Settings: Displays the list of settings that are applied to ALL elements globally.

  3. Advanced Settings: Contains advanced settings for SGML, DITA, Variables, and Character Maps.

When saving the rules, FrameMaker saves only the elements and the rules that have been modified (modified elements have their values marked in bold, on the right pane). Default behaviors are not saved.

Test XML roundtripping

Know how to test XML round tripping in FrameMaker.

Once you have configured the structured application, you can test XML roundtripping.

  1. Create a valid structured proposal in FrameMaker.

  2. Export the FrameMaker file to XML. To do so, select File > Save As and choose XML as the output format. If prompted, select the Proposal application.

  3. Open the exported XML file in a text editor or an XML editor and verify that you have a valid XML file.

  4. In an XML or a text editor, modify the file you just exported. You can also create an XML file that validates against the proposal DTD. Save the new XML file.

  5. In FrameMaker, open the XML file. Verify that the XML file imports correctly and that formatting is applied automatically.

Configuration file editor

Every structured application has a configuration file that defines the behavior of the structured application. Learn how to use the Configuration File editor in FrameMaker.

Every structured application may include an XML configuration file. The configuration file is optional and contains attributes and their suggested and default values. To call the editor, choose Element > Launch Config File Maker.

When opening a structured application, FrameMaker reads the corresponding configuration file (if it exists) and populates the attribute values automatically.

The attribute editor allows you to change these values, when using the structured application.

The Configuration File Settings dialog is displayed as follows:

Configuration File Settings
Configuration File Settings for a Structured Application

XML with Cascading Style Sheets

Understand the relationship between an XML document and Cascading Style Sheets (CSS2) file in structured FrameMaker.

When an XML document is opened in FrameMaker, FrameMaker processes the Cascading Style Sheets 2 (CSS2) by mapping the CSS information to appropriate EDD rules in the EDD document.

The following scenarios describe the processing of CSS2 in FrameMaker:

Note: An XML file opened in FrameMaker can contain multiple CSS files. FrameMaker supports the author’s style sheet only, and not the user’s style sheet.

Import CSS element styles into an EDD file

You can import element formatting from CSS into EDD to ensure consistent formatting across different XML applications. The CSS file can be referenced in the XML document or manually imported. Multiple CSS files can be imported sequentially for multi-level formatting.

When importing element styles, FrameMaker retains the context information (element property or selector) from the CSS and imports it into the appropriate EDD contexts.

Note: FrameMaker imports style information only at the element level.

You can also set CSS preferences in XML using Structured FrameMaker. For more information, see the Developing Structured Applications with AdobeFrameMaker.

  1. Open the EDD file in structured FrameMaker.

  2. Select Structure > Import CSS Styles. The Import CSS dialog box appears.

  3. Select a CSS file, and click Open.

  4. If the Structured Application element in the EDD file doesn’t define an application name, the Use Structured Application dialog box appears. Select the application that was used to create the EDD file. Click Continue.

The CSS file is imported into the EDD file.

Note: If the EDD already contains formatting rules, the CSS properties are appended to the existing rules. If the CSS properties overlap some of the existing rules, the CSS properties replace the existing rules in the EDD. The EDD doesn’t support all properties and selectors defined in CSS 2.0. If a property or selector in the CSS file can’t be mapped to an equivalent EDD rule, that property or selector is ignored. No error is displayed when this happens, and no error log is created.

After importing the CSS styles, you can import element definitions from the EDD into a template and use the template to open an XML file.

As an alternative to the CSS import process, you can use FrameMaker to open an XML file that already has CSS styles associated with it. When you open the XML file, FrameMaker reads the DTD and CSS files and generates a temporary template that is used to open the XML file.

Export CSS for a FrameMaker XML file

You can export XML style information available in your document for all elements using the Cascading Style Sheets 2 (CSS2) format, to an EDD file. You can then import these CSS Style definitions from the EDD file to new XML files. Cascading Style Sheets let authors attach styles, such as fonts and spacing, to structured XML files. CSS2 format is a W3C standard.

When you choose the Generate CSS2 command, styles from well-formed structured documents are generated, based on the formatting information available in the EDD associated with the source document. FrameMaker exports style information only at the element level. For example, if you apply a style to only one particular word in the Text element, that one instance of style is not exported.

You can set CSS 2 preferences in the XML application. For example, you can determine whether the CSS 2 file is automatically generated when you export to XML. For more information, see the online manual Developing Structured Applications with AdobeFrameMaker.

  1. Open the template or document with an associated EDD in Structured FrameMaker.

  2. Select Structure > Generate CSS2.

XML with schema

See what is XML with schema and understand the schema workflow in FrameMaker. See XML namespaces in FrameMaker.

FrameMaker allows you to import XML markup documents that are associated with W3C's XML Schema language. FrameMaker automatically creates a DTD and EDD from the schema. FrameMaker validates the document structure against the associated schema upon both import and export to XML, but does not retain all schema information upon export.

For complete details of how schema is mapped to DTD, see the Structure Application Developer Referenceguide.

Note: This release offers support for schema that is equivalent to what was previously available for DTD. That is, EDD has not been extended to accommodate features in schema that are not available in DTD. For this reason, schemas are read-only, and you cannot export the EDD back out to schema.

Schema workflow

You can import an XML document that references a schema file, and you can specify a schema file in your structure application, to use for validating a document upon export to XML.

  1. For a specific XML document, you can include the path of the schema file in the XML using the attributes @noNamespaceSchemaLocation or @schemaLocation depending on whether your schema includes a target namespace or not.

  2. To specify a schema file for use in exporting XML, modify the structapps.fm file. Use the <Schema> element as part of the <XMLApplication> to provide the schema file path for export.

  3. Open the XML in FrameMaker using a structured application. Edit it.

  4. Save the XML using a structured application. The <Schema> element in the structapps.fm file is output in the file and validation is performed against it.

In this workflow, a DTD is generated automatically as an intermediary file from the schema given in the XML document, and you do not modify it. However, you can also use a schema file to generate an EDD; see Generate an element catalog (EDD) from a schema.

Changes to the structure application for schema support

The new element <Schema>, a child of the <XmlApplication> element, specifies the path of a schema file in the structapps.fm structure application file. If instance documents use namespaces, the property <Namespace> in <XmlApplication> must be set to true.

In order for a structure application to be selectable in the Use Structured Application list while importing a document that is associated with a schema, the schema’s root element must be included in the application’s <DOCTYPE> in the <XmlApplication> element.

Generate an element catalog (EDD) from a schema

You can create an EDD from a schema definition, or import the elements from a schema definition into an existing EDD. FrameMaker converts the schema definition to DTD first, and then creates or imports elements to an EDD.

Use the following commands in the Structure > Schema menu:

  • Open schema: This command converts a specified schema to DTD, and creates an EDD from the DTD.

  • Import schema: This command converts a specified schema to DTD, and imports elements from the DTD into an existing EDD.

Each command opens a File Choose dialog box that allows you to specify the schema file, then a Save dialog box in which you specify where to save the resulting DTD file.

  1. In Structured FrameMaker, select Structure > Schema > Open Schema.

  2. Choose a schema file.

  3. Choose a path for the DTD to be output.

  4. Examine the resulting DTD and make any modification you want.

  5. Create an EDD from the generated DTD, as described in the Structure Application Developer Referenceguide.

  6. Use this EDD to create a template that can be included in the Structured Application.

  7. Provide your DTD path along with the Schema Location in the input XML. This will make sure that FrameMaker works correctly with your template. Validation of input and output XML is still performed against the schema.

View or edit XML namespaces

An XML namespace is a collection of names for specific element types and attribute names within an XML document. The scope of a namespace extends beyond its containing document.

Because a single XML document can contain elements and attributes that can be used by multiple software applications, you can use namespaces to differentiate which elements and attributes are to be used by which applications. Software applications that process XML use namespaces to recognize which tags and attributes they are designed to process.

Names from XML namespaces may appear as qualified names, which contain a single colon, separating the name into a namespace prefix and a local part. The prefix, which is mapped to a Uniform Resource Identifier (URI) reference, selects a namespace. The combination of the universally managed URI namespace and the document's own namespace produces identifiers that are universally unique.

Using XML namespaces in FrameMaker

FrameMaker supports namespace usage for all elements in an XML document. When you import an XML document containing namespaces, all namespace information is preserved.

You can view, edit, add, or delete namespaces to an XML document in Structured FrameMaker using the Namespaces command. You can also use this command to view the definition of the prefix on an element tag and select the element that defines the prefix.

By default, namespaces in FrameMaker are handled as namespaces, appearing in the Namespaces dialog box. However, you can disable namespaces in the application and have them handled as attributes instead, appearing in the Structure View.

  1. Open the document in Structured FrameMaker.

  2. Select an element in the Structure View.

    Note: Elements that contain namespaces appear in Structure View with an asterisk (*) next to their names.
  3. Choose Element > Namespaces.

  4. In the Namespaces dialog box, click Select Defining Element to view the namespace for the selected element in the Structure View.

  5. Make any desired changes to the Declared Namespaces, Prefix, or Path and then click Add, Change, or Delete. To close without saving your changes, close the dialog box without clicking an option.


April 29, 2020

Legal Notices | Online Privacy Policy