KeyView 23.4

# KVXMLTemplate

This structure defines the overall framework of the XML output. Members in this structure define the XML markup written at specific points in the output stream. The pointers contain XML markup that might include embedded KeyView-defined tokens. The XML markup contained in these strings should be well-formed. For the generated document to be valid, the markup must conform to the Verity DTD. The structure is initialized by calling the `fpConvertStream()` or `KVXMLConvertFile()` function. See fpConvertStream() or KVXMLConvertFile().

    typedef struct tag_KVXMLTemplate
    {
        char     *pszMainTop;
        char     *pszMainBottom;
        char     *pszFirstH1Start;
        char     *pszFirstH1End;
        char     *pszMiddleH1Start;
        char     *pszMiddleH1End;
        char     *pszLastH1Start;
        char     *pszLastH1End;
        char     *pszH[2..6]XML;
        char     *pszTOCH[1..6]Start;
        char     *pszTOC_H[1..6];
        char     *pszTOCH[1..6]End;
        char     *pszXFile;
        char     *pszXStartBlock;
        char     *pszXEndBlock;
        char     *pszStartBlock;
        char     *pszEndBlock;
        BOOL      bPutBlocksInSeparateFiles;
        BOOL      bHardPageMakesNewBlock
        long      lcbBlockSize;
        char     *pszChunkTemplate;
        char     *pszUserSummary;
        char     *pszTOCH[1..6]LeafNode;
    }
    KVXMLTemplate;

## Member Descriptions

`pszMainTop` | The markup and tokens inserted at the beginning of the main XML file. Most of the sample template files feature `<MetaData>` tags with tokens that store the metadata of the input document. This member does not include the processing instructions or document type declarations that appears at the beginning of an XML document. The document type declaration `<?xml version= ...>` is automatically generated by XML Export. If you are using style sheets or the Verity DTD, the `<?xml stylesheet= ...>` and `<!DOCTYPE ...>` processing instructions are also automatically generated by XML Export.
`pszMainBottom` | The markup and tokens inserted at the end of the main XML file.
`pszFirstH1Start` | The markup and tokens inserted at the beginning of the first created H1 XML block (that is, the block associated with the first H1 table of contents entry).
`pszFirstH1End` | The markup and tokens inserted at the end of the first created H1 XML block (that is, the block associated with the first H1 table of contents entry).
`pszMiddleH1Start` | The markup and tokens inserted at the beginning of those H1 XML blocks that are neither the first nor the last H1 blocks created (that is, blocks associated with all but the first and last H1 table of contents entries).
`pszMiddleH1End` | The markup and tokens inserted at the end of those H1 XML blocks that are neither the first nor the last H1 blocks created (that is, blocks associated with all but the first and last H1 table of contents entries).
`pszLastH1Start` | The markup and tokens inserted at the beginning of the last created H1 XML block (that is, the block associated with the last H1 table of contents entry).
`pszLastH1End` | The markup and tokens inserted at the end of the last created H1 XML block (that is, the block associated with the last H1 table of contents entry).
`pszH[2..6]XML` | The markup and tokens inserted in an XML block for heading levels 2 through 6.
`pszTOCH[1..6]Start` | The markup and tokens inserted at the beginning of a table of contents block for heading levels 1 through 6 entries. For example: `<ol list-style-type="upper-roman">`
`pszTOC_H[1..6]` | The markup and tokens required to process the table of contents entries for heading levels 1 through 6. For example: `<a xmlns:xlink="http://www.w3.org/TR/xlink" xlink href= "#$ANCHOR"> $TOCTE</a>` If the table of contents heading contains special characters, such as an ampersand (&) or parentheses, you must use the `$TOCPE` token in the `pszTOC_H[1..6]` markup. This token retains character entities and prevents validity errors. See Export Tokens for more information on table of contents tokens.
`pszTOCH[1..6]End` | The markup and tokens inserted at the end of a table of contents block for heading levels 1 through 6 entries. For example: `</ol>`
`pszXFile` | The markup and tokens generated and placed in an extra XML file. This file holds content from the source document. To process this file, you would use the `$XANCHOR` token. See Export Tokens for more information on Export tokens.
`pszXStartBlock` | The markup and tokens inserted at the beginning of each XML block generated by the `$XANCHOR` token. If either this member or `pszXEndBlock` is defined, both `pszStartBlock` and `pszEndBlock` are ignored. See Export Tokens for more information on Export tokens.
`pszXEndBlock` | The markup and tokens to include in the outoput output at the end of each XML block generated by the `$XANCHOR` token. If either this member or `pszXStartBlock` is defined, both `pszStartBlock` and `pszEndBlock` are ignored. See Export Tokens for more information on Export tokens.
`pszStartBlock` | The markup and tokens inserted at the beginning of each block created as a result of `lcbBlockSize` or `bHardPageMakesNewBlock`.
`pszEndBlock` | The markup and tokens inserted at the end of each block created as a result of `lcbBlockSize` or `bHardPageMakesNewBlock`.
`bPutBlocksInSeparateFiles` | Set `bPutBlocksInSeparateFiles` to `TRUE` to create a separate XML file for each heading level 1 block. Each new block uses the markup defined in `pszStartBlock` and `pszEndBlock`. If you set `bPutBlocksInSeparateFiles` to `FALSE`, each heading level 1 block is placed sequentially in the same file, after the initial markup is written.
`bHardPageMakesNewBlock` | Set `bHardPageMakesNewBlock` to `TRUE` to have hard page breaks in the source document generate new XML files during the conversion process. The member `pszchunktemplate` provides the appropriate table of contents entry for the new block. This option applies to word processing documents and spreadsheets only.
`lcbBlockSize` | The maximum size (in bytes) of heading level 1 XML output files. This number is used as a guideline and can be exceeded to break content at a logical location. This setting is not used when exporting spreadsheets. Setting `lcbBlockSize` to `0` indicates that there is no maximum size.
`pszChunkTemplate` | If an H1 XML block is subdivided into separate files as a result of the size limitations specified in `lcbBlockSize`, this member provides a template for creating a table of contents entry for the new file. The block number can be made a part of this template by inserting the `$SPLITBLOCKNUMBER` token. For example: `Page $SPLITBLOCKNUMBER`
`pszUserSummary` | The markup and tokens generated when the `$USERSUMMARY` or `$SUMMARY` tokens are used. For example: `<MetaData name="$NAME" content="$CONTENT"/>`
`pszTOCH[1..6]LeafNode` | The markup that replaces `pszTOC_H[1..6]` entries for leaf nodes in the table of contents. A leaf node is a node that has no children.

## Discussion

A pointer to this structure is passed as an argument to `fpConvertStream()` and `KVXMLConvertFile()`. If the pointer to the structure is not `NULL`, the values of the members specified in the structure are used. If the pointer to the structure is `NULL`, the default values are used.

Copyright 1997-2023 Open Text
Version 23.4 | Last updated September 2023

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL KeyView 23.4

Topic Title: KVXMLTemplate