Learn how to save a structured document in SGML or XML format in FrameMaker.
You can save any structured FrameMaker document as SGML or XML. The contents, elements, and attributes from the document are preserved; however, formatting is not preserved. You can save to a different structured document type than the original (such as SGML to XML), but you may encounter errors due to differences in DTDs.
When you save Unicode content as an XML file, FrameMaker specifies the encoding automatically. By default, FrameMaker uses the UTF-8 encoding format.
Before saving a document as SGML or XML, you should validate it and correct any errors in the elements and attributes (see “Validating documents”). Otherwise, the markup may be invalid.
When saving structured XML documents, make sure valid XML element names start with a letter and contain only alphanumeric characters, periods, or hyphens. Spaces, underscores, and other characters in XML element names are invalid characters, and are either converted to hyphens (-) or generate errors.
Headings, tables, and reference pages are not used in XML export, and the default element names are simply the style names.
Default encoding settings for exporting structured documents are ISO-8859-1 for SGML and UTF-8 for XML. If the structured document is an imported SGML or XML file, FrameMaker uses the encoding settings in the original file instead of the default settings.
Choose
.Specify a filename and location. You may want to add the appropriate extension (such as .sgm or .xml) to the filename.
Select SGML or XML from the drop-down list. Click Save. If the document has an application associated with it, the document is saved.
If the Set Structured Application dialog box appears, select an application name from the Set Structured Application drop-down list. Click Continue. Then do one of the following:
To associate an application with the document, select the name of an application.
To use default mapping and no read/write rules, select <No Application>
.
If FrameMaker finds any structure errors when you save a document, it lists error messages in a view-only error log. If a message refers to an error in the FrameMaker document, the message is linked to the document. For most errors, you can click the message to go to the location of the problem.
When you open the structured documents, import element definitions into them. You’ll probably need to make a few corrections to their structure.