You can create a blank XML document that is not based on a structured application. You can also create an XML document that is based on an existing DTD (Document Type Definition). Or you can create structured XML documents that are based on structured applications.
You can create a blank XML document from scratch. This document only contains a single root element (ROOT).
1)Open the New XML dialog (File > New > XML).
2)In the Other XML tab, select Empty XML and click OK.
3)Open the Elements catalog to view the list of elements in the catalog (Element > Element Catalog).
note: The Elements catalog contains a 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 p element within a ROOT element:
p tag added in XML view
In the WYSIWYG view, the Elements catalog now displays 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).
1)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>
2)Save the text file with the .dtd extension.
3)Open the New XML dialog (File > New > XML).
4)In the Other XML tab, select DTD based XML and click OK.
5)In the New XML dialog:
Root Element
Specify the name for the root element of the XML document. This is the topmost element in the hierarchy.
Public ID
A public ID in an XML document makes it portable to other computers.
System ID
Path to the DTD. This can be a path on your file system or a URL.
note: If you view the document in the XML view, the public ID and the System ID are stored in the DOCTTYPE declaration at the top of the file.
6)Click OK.
The BODY, CHAPTER, and HEADLINE elements defined in the DTD are available in the Elements catalog.
7)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:
DITA
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 a tag structure suited to authoring, producing, and delivering technical documentation. The types of tags in DITA include <topic>, <title>, <shortdesc>, <prolog>, <body>, and <concept>.
xDocBook
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 tags include <article>, <section>, <title>, <articleinfo>, and <pubdate>.
XHTML
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. Using XHTML is an easy way to migrate from HTML to XML while retaining forward and backward compatibility of your content.
S1000D
For performance considerations, FrameMaker does not run the associated S1000D scripts at startup. Before creating document based on S1000D applications, you need to:
a)Open the Preferences dialog box (Edit > Preferences).
b)Go to the General > Launch tab and remove the following entries from the Don’t Load Startup Scripts field:
S1000dUtilities and S1000Dmenu
c)Click OK and restart FrameMaker.
In addition, you can create your own structured application. You can then create documents based on this application.
1)Open the New XML dialog (File > New > XML).
2)Select a structured application from the Structured Applications tab or select a DITA structured application in the DITA tab.
note: The DITA structured applications are also available in the Structured Applications tab.
3)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.
Choose 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.
Choose 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.