Learn how to create a new XML document, open an XML document, and save an XML Document with Adobe FrameMaker.
With Adobe FrameMaker, you can create a blank XML document. You can also create an XML document that is based on an existing DTD (Document Type Definition) or on an existing Structured Application. You can also open existing XML documents, edit them, and save them.
You can create a blank XML document from scratch.
This document only contains a single root element (<ROOT>
).
Open the New XML dialog ( ).
In the Other XML tab, select Empty XML and click OK.
Open the Elements catalog to view the list of elements in the catalog ( ).
<TEXT>
and a <ROOT>
element.In
the WYSIWYG view, you can only add <ROOT>
elements
or text to the root elements.
In the XML view, you are able
to add elements to the XML structure. For example, you can add a <SECTION>
and
a <P>
element within a <ROOT>
element:
In
the WYSIWYG view, the Elements catalog now
displays the <SECTION>
and the <P>
element.
You can now add this element in the XML document. This document
is not based on any Structured Application, so FrameMaker does not
enforce any structural rules on the document. FrameMaker, however,
ensures that the structure of the XML is maintained.
You can create a XML document based on an existing DTD (Document Type Definition).
Save the following snippet into a text file.
<!ELEMENT BOOK (CHAPTER+)>
<!ELEMENT CHAPTER (HEADLINE,BODY)>
<!ELEMENT HEADLINE (#PCDATA)>
<!ELEMENT BODY (#PCDATA)>
<!ATTLIST CHAPTER AUTHOR CDATA #REQUIRED>
Save the text file with the .dtd extension.
Open the New XML dialog ( ).
In the Other XML tab, select DTD based XML and click OK.
In the New XML dialog:
Specify the name for the root element of the XML document. This is the topmost element in the hierarchy.
A public ID in an XML document makes it portable to other computers.
Path to the DTD. This can be a path on your file system or a URL.
Click OK.
The <BODY>
, <CHAPTER>
,
and <HEADLINE>
elements defined in the DTD
are available in the Elements catalog.
Insert the <CHAPTER>
element into
the document.
The Attributes for New Element dialog prompts
you to specify the value of the AUTHOR
attribute.
A Structured Application defines structural rules (using EDD or DTD), content formatting (using templates), read/write rules for the documents that are based on the application. FrameMaker provides a set of out-of-the-box Structured Applications that you can use to create documents. These applications are based on the following open standards:
Darwin Information Typing Architecture (DITA) provides an
off-the-shelf DTD and set of rules designed specifically for writing
online documentation, such as software help files. It defines an
element structure suited to authoring, producing, and delivering
technical documentation. The types of elements in DITA include,
for example, <topic>
, <title>
, <shortdesc>
, <prolog>
, <body>
,
and <concept>
.
DocBook is also an open standard, designed for technical
articles and documentation. DocBook provides a DTD for writing technical
books and articles, with a structure that such forms imply. DocBook
elements include <article>
, <section>
, <title>
, <articleinfo>
,
and <pubdate>
.
Extensible Hypertext Markup Language (XHTML) is an extension of HTML that is based on XML and is designed to work with XML-based applications. It can be viewed, edited, and validated with standard XML tools.
For performance considerations, FrameMaker does not run the associated S1000D scripts at startup. Before creating document based on S1000D applications, you need to:
Choose Preferences dialog.
to open theGo to the Don’t Load Startup Scripts field:
tab and remove the following entries from theS1000dUtilities
and S1000Dmenu
Click OK and restart FrameMaker.
Quick access to the S1000D/ATA resources has been provided in the Help > S1000D Functionality menu.
To know more, choose Help > S1000D Functionality.
In addition, you can create your own Structured Application. You can then create documents based on this application.
Choose New XML dialog.
to open theSelect a Structured Application from the Structured Applications tab or select a DITA Structured Application in the DITA tab.
Click OK.
The elements in the Elements catalog and the attributes defined for each element are based on the Structured Application on which the document is based.
Since structured documents enforce structural rules, the elements in the Elements catalog are based on the current context.
When you save an XML document, if you prompted with the following dialog, you need to select the associated Structured Application.
If you choose an incompatible Structured Application, the errors are logged to the message console.
When you open a structured document, the FrameMaker error console displays structural and other issues in a document, if any. This console also provides the following information about document issues:
Exact location of the issues within the document
Name of invalid elements, if any
When you open an XML document, if you are prompted with the following dialog, you need to select the associated Structured Application.
If you choose an incompatible Structured Application, the errors are logged to the error console. In addition, if the XML document hierarchy does not follow the structural rules defined in application, the document is displayed with errors in the Structure View.