File Content Extraction 26.1
HTML Export SDK Java Programming Guide

# Include Revision Information

Applications sometimes have revision tracking features — such as Track Changes in Microsoft Word — and save information about the changes that are made to a document. This information might include the reviewer's name and the date and time of each change.

When a supported file contains revision information, File Content Extraction can convert any deleted text and graphics and include the revision information in the HTML output. Deleted content and revision information are not included in the HTML output by default.

If you include revision information in the output, content that was added to a document is identified by `<ins>` tags and is usually underlined when displayed in a browser. Content that was deleted from a document is identified by `<del>` tags and is usually displayed with strikethrough formatting. The precise appearance depends on the browser and can be modified with CSS.

File Content Extraction generates `<ins>` and `<del>` tags that can include the following attributes:

`style` | The standard `style` attribute, which you can use to alter the presentation of the text. You can define a collection of styles to apply to changes. If you define sufficient styles, each reviewer's changes are displayed in a different style. This attribute is not included by default. See Configure the Revision Style.
`title` | By default, the value of this attribute is "inserted:" or "deleted:", followed by the reviewer's name and the date and time of the change. You can customize the prefix and include or exclude the reviewer's name and the date and time. For information about customizing this attribute, see Configure the Revision Title.
`cite` | The name of the reviewer who made the revision.
`datetime` | The date and time the revision was made, in ISO 8601 format (`YYYY-MM-DDThh:mm:ss`).

For example, the following markup could be generated for some inserted text:

`<ins style="color: red;" title="inserted: John D, 2022-06-13T11:17:00Z" cite="mailto:John D" datetime="2022-06-13T11:17:00Z">This text was added</ins>`

This text is displayed in the browser as follows:

This text was added ...while this existed before the change.

When you hover the cursor over the underlined text in the browser, the value of the `title` attribute, for example "inserted: John D, 2022-06-13T11:17:00Z", is displayed as a tooltip.

To convert deleted text and graphics and include revision information

- Call the method `includeRevisionMark()` on your HTML Export object.

  - To use the default options, call the method without any arguments:

        objHtmlExport.includeRevisionMark();

  - To customize the output, instantiate a `RevisionMarkConfig` object and then pass that into the `includeRevisionMark()` method:

        RevisionMarkConfig myRevisionConfig = new RevisionMarkConfig();

        // Add an author style
        myRevisionConfig.addAuthorStyle("color: red;");

        // Generate title attributes with default settings
        myRevisionConfig.showTitleAttributeInDelTag();
        myRevisionConfig.showTitleAttributeInInsTag();

        objHtmlExport.includeRevisionMark(myRevisionConfig);

## Configure the Revision Title

You can customize the value of the `title` attribute.

The following example sets the prefix to "Added:" or "Removed:", for inserted and deleted text respectively, and includes the contributor's name but not the date/time:

    RevisionMarkConfig myRevisionConfig = new RevisionMarkConfig();

    // Configure title attributes
    myRevisionConfig.showTitleAttributeInInsTag("Added:", false, true);
    myRevisionConfig.showTitleAttributeInDelTag("Removed:", false, true);

    objHtmlExport.includeRevisionMark(myRevisionConfig);

## Configure the Revision Style

You can define a style (such as `color: red; background: yellow;`) to apply to a reviewer's modifications, so that your users can identify new or deleted text, and even differentiate between contributors to the document. For example, changes made by one contributor could be displayed in red, changes by another in green, and so on.

The following example defines two revision styles:

    RevisionMarkConfig myRevisionConfig = new RevisionMarkConfig();

    myRevisionConfig.addAuthorStyle("color: red; background: yellow;");
    myRevisionConfig.addAuthorStyle("color: green; background: silver;");

    objHtmlExport.includeRevisionMark(myRevisionConfig);

If there are more reviewers than defined styles, File Content Extraction applies styles to the reviewers in the order in which they are encountered in the document, and then applies styles starting from the beginning of the list to the remaining reviewers. This process is repeated until all reviewers' edits are highlighted.

NOTE: File Content Extraction does not validate styles. They are written directly to the HTML output.

## Generate a Revision Summary

You can configure File Content Extraction to summarize the changes made to a document in a revision summary file that is generated during the HTML conversion. The summary file is created in the directory where the HTML output is generated. The default file name is `output_filename.revsum.htm`.

The following example shows how to configure File Content Extraction to create a revision summary file. The arguments to the `showRevisionSummary` method are markup to include at beginning and end of the file.

    RevisionMarkConfig myRevisionConfig = new RevisionMarkConfig();

    myRevisionConfig.showRevisionSummary("<html><body>", "</body></html>");

    objHtmlExport.includeRevisionMark(myRevisionConfig);

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 2026

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: File Content Extraction 26.1

Topic Title: Include Revision Information