KeyView 24.4
KeyView XML Export SDK C Programming Guide

# Set Conversion Options

Conversion options are parameters that determine the content, structure, and appearance of the XML output. For example, you can specify:

- the markup inserted at the beginning and end of specific XML blocks
- whether a heading is included in the table of contents
- the output character set
- the resolution at which graphics are converted.

## Set Conversion Options by Using the API

You set conversion options by modifying the following data structures:

- KVXMLTemplate
- KVXMLOptions
- KVXMLHeadingInfo
- KVXMLTOCOptions

These data structures are then passed into functions in the KeyView Export API, such as:

- fpConvertStream()
- KVXMLConvertFile()
- KVXMLStartOOPSession()

## Explore Conversion Options with the Sample Programs

To make it easier to explore the conversion options, XML Export includes some sample configurations in the form of initialization (`.ini`) files. These are read by the xmlini sample program (you must supply the `.ini` file path as a command-line argument). The sample program reads the configuration, and converts your input file into XML using the options you set, by passing them into the API. This lets you try out conversion options without programming.

You can use a text editor to customize the configuration files. In general, a section name refers to the structure containing an option, and a parameter name matches an element of that structure. For example:

    [KVXMLOptions]
    eOutputCharSet=KVCS_SJIS
    bForceOutputCharSet=TRUE

This sets the `eOutputCharSet` and `bForceOutputCharSet` elements in the KVXMLOptions structure.

NOTE: To create valid XML, an initialization file must define at least two structures: `KVXMLTemplate` and `KVXMLOptions`. Additionally, if you enter markup in the template files that is not compliant with XML standards, XML Export inserts the markup into the output file unchanged. This might result in a malformed XML file.

### Templates

The template files for the C API implementation are in the directory `install\xmlexport\programs\ini`, where `install` is the path name of the Export installation directory. The following templates are provided:

Template | Description
--- | ---
Cascading style sheet (`xml_css.ini`) | This template writes style sheet information to an external CSS file. This makes the XML output significantly smaller because the information is not stored in the output file. See Use Style Sheets and Use Style Sheets with xmlini for more information on using an external CSS file.
Index (`xml_index.ini`) | Converts a source document into a single, largely unformatted XML file that is appropriate for use with an indexing engine.
Single file( `xml1file.ini`) | Creates a single XML file. Does not define an XSL style sheet. A default XSL style sheet that is appropriate to the source document type is used. The defaults supplied are `wp.xsl` (for word processing documents), `ss.xsl` (for spreadsheets), `pg.xsl` (for presentations). Forces the output character set to UTF-8. Maintains the source document's fonts and styles. Does not create a table of contents.
Single file for presentations (`xml1file_pg.ini`) | This template is designed specifically for presentation formats. Creates a single XML file. Defines an XSL style sheet for presentations (`pg.xsl`). Forces the output character set to UTF-8. Because XML Export only extracts textual components from presentations, the `bRasterizeFiles` member of `KVXMLOptions` is set to `FALSE`. KVXMLOptions. Only the `szMainTop`, `szMainBottom`, and `szUserSummary` parameters of the `KVXMLTemplate` structure are relevant to presentations and are set in the presentations template. A template file for presentations must not include any other parameters in the `KVXMLTemplate` structure. KVXMLTemplate.
Single file with table of contents (`xml1filetoc.ini`) | Creates a single XML file. Creates a table of contents at the top of the XML document. Uses the `Verity.dtd`. Uses an XSL style sheet (`wp.xsl`). Forces the output character set to UTF-8. Lists all metadata (Title, Subject, Author, Comments, Created, Modified, Last Saved By, and Revision Number). Uses the name of the worksheets for spreadsheets. Uses the slide titles for presentations. If no titles are available in the source document, it uses "slide 1," "slide 2," "slide 3," and so on.

Copyright 1997-2024 Open Text
Version 24.4 | Last updated September 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.4

Topic Title: Set Conversion Options