MicroStrategy ONE

Export Formats Configuration File XML Structure

The export formats configuration file groups a list of export format objects. These objects are used to define the properties of the different export formats that the application supports, such as Excel, HTML, plain text, and CSV (comma-separated values) file format.

Export format configuration settings are generally set in the exportFormats.xml file, but they can also be made within pageConfig.xml. The recommended practice is to use a separate configuration file to ensure that your customizations are correctly propagated in future upgrades. You use the same XML structure whether you make the settings in exportFormats.xml or in pageConfig.xml.

A sample of the XML structure for exportFormats.xml is shown below, followed by a description of the elements and attributes that make up the file.

XML structure

<export-formats version="1.0">

    <!-- Document Export modes -->

    <export-format
    name="excelFormattingGrids"

    bean-type="ReportBean"

    desc="Excel with formatting (html)"

    desc-id="mstrWeb.2389"
    file-extension="xls"

    mime-type="application/vnd.ms-excel"
    style="ReportGridStyleExportExcelFormatting"
    view-mode="com.microstrategy.web.objects.EnumWebReportViewMode.ReportViewModeGrid"
    export-format-type="com.microstrategy.web.app.beans.EnumExportFormats.ExportFormatExcelWithFormatting"
    page-name="export"
    feature-id="!iserver-supports-excel-formatting;web-export-to-excel;report-is-grid-view-mode" />

    ...

</export-formats>

Description

The table below describes the XML structure of the export formats configuration file. The four columns in the table include the following descriptive information:

Parent Element

- Child Element 1

- Child Element 2

Indicates the name of the element described in the next three columns. If this is a parent element, the names of all possible child elements are listed below the parent element.

Number of Nodes

Specifies the number of nodes that are required or allowed for the corresponding element in the Parent Element column. For example, if the value is "1", there must be only one node— no more, no less. If the value is "0 or more", the node is not required ("0"), but there is no restriction on the number of nodes that can be added ("or more"). If the value is "1 or more", the node is required ("1"), but there is no restriction on the number of nodes that can be added ("or more").

Parent Element Attributes

Lists the separate attributes that can be used with the corresponding element in the Parent Element column. Included in parentheses beneath each attribute name are the attribute type and an indication of whether the attribute is required or implied. For example, the version attribute for the <export-formats> element has an attribute type of "nmtoken" (name token) and is implied. The file-extension attribute for the <export-format> element has an attribute type of "cdata" (character data) and is required.

Description

Describes either a parent element in the Parent Element column or an attribute in the Parent Element Attributescolumn.

Parent Element

- Child Element 1

- Child Element 2

Number of Nodes Parent Element Attributes Description

<export-formats>

- <export-format>

1

 

 

The <export-formats> element groups a list of export format objects. These <export-format> element s are used to define the properties of the different export formats that the application supports. (When you use a separate configuration file, the <export-formats> element represents the root element of the file.)

config-src

(cdata / implied)

If the export formats are defined in a separate file, the config-src attribute tells the page configuration file the location of the export format configuration file.

version

(nmtoken / implied)

If the export formats are defined in a separate file, the version attribute indicates the release number of the export format configuration file. This attribute is useful for backwards compatibility because it lets the application know what features are available.

<export-format>

 

 

 

 

1 or more

 

 

The <export-format> element defines the properties of a single export format supported by the application.

name

(id / implied)

The name attribute provides a unique identifier for the export format.

 

bean-type

(cdata / implied)

The bean-type attribute indicates whether the bean is a ReportBean, DocumentBean, or RWBean.

desc

(cdata / implied)

The desc attribute provides a descriptor that the application should use to display the description of the export format if the desc-id attribute is missing.

desc-id

(cdata / implied)

The desc-id attribute provides the Resource Bundle item id that the application should use to display the description of the export format in the language of the user's locale.

file-extension

(cdata / required)

The file-extension attribute indicates the extension that the application gives to the file that is created when exporting using the export format.

mime-type

(cdata / required)

The mime-type attribute indicates the mime-type that the export format uses.

style

(cdata / implied)

The style attribute determines the name of the style (from the Style Catalog) that is used to transform the bean when exporting using the export format.

view-mode

(cdata / implied)

 

 

The view-mode attribute indicates the view mode that the export format uses. The values of the attribute are expressed using the fully-qualified name of the constants defined in the EnumWebReportViewMode interface (for example, ReportViewModeGrid).

export-format-type

(cdata / implied)

The export-format-type attribute indicates the associated export format  from the EnumExportFormat interface. The value is expressed using the fully-qualified name of the values defined in this interface (for example, ExportFormatExcelWithPlaintext).

page-name

(nmtoken / implied)

The page-name attribute indicates the page (as defined in pageConfig.xml) that the application uses when exporting using the specified export format (for example, exportBinary).

feature-id

(cdata / implied)

The feature-id attribute represents a feature that is evaluated to determine whether the export format should be used.

See also