MicroStrategy ONE

Style Catalog Configuration File XML structure

Data presentation in MicroStrategy Web is accomplished through settings in the Style Catalog Configuration file, called styleCatalog.xml. A sample of the XML structure of styleCatalog.xml is shown below, followed by a description of the elements and attributes that make up the file.

While it is not necessary to thoroughly understand each of the nodes, this discussion provides a good starting point for understanding the different elements that make up a style in MicroStrategy Web.

The main nodes in the Style Catalog Configuration file are listed below.

  • <BeanDefns>:

    Contains multiple <BeanDefn> child nodes that each specify the name, description, and class for a particular type of bean.

  • <MapperDefns>

    Contains multiple <MapperDefn> child nodes that each specify the name and class for a particular style mapper.  

  • <StyleMaps>

    Contains multiple <StyleMap> child nodes that hold information about the style that is being mapped, style mapper to be used and the style to be used when the mapping condition is satisfied.

  • <Styles>

    Contains multiple <Style> child nodes that hold information such as style name, style description, transform to which the style is applied, values of transform parameters, and layout definition file to be used.

The actual styles themselves are set in individual <style> nodes under the parent <styles> node. Each <style> node can have the following child nodes.

  • <Layouts>

    Contains multiple <Layout> child nodes that each specify the layout source, location, and order.

XML structure for the Style Catalog Configuration file (styleCatalog.xml)

<!DOCTYPE StyleCatalog SYSTEM "styleCatalog.dtd">

<StyleCatalog description="MSTR System Style Catalog" name="MSTRStyleCatalog" version="1.0"

  <BeanDefns>

    <BeanDefn class="com.microstrategy.web.beans.ReportBean" description="Report bean" name="Report" />

    <BeanDefn class="com.microstrategy.web.beans.FolderBean" description="Folder bean" name="Folder" />

    ...

  </BeanDefns>

  <LayoutParserDefns global_parser="AppLayoutParser">

    <LayoutParserDefn name="MSTRLayoutParser" class="com.microstrategy.web.transform.MSTRLayoutParser"/>

    <LayoutParserDefn name="AppLayoutParser" class="com.microstrategy.web.app.transforms.AppLayoutParser"/>

    ...

  </LayoutParserDefns>

  <TransformDefns>

    <TransformDefn class="com.microstrategy.web.app.transforms.FolderTransformBullet" name="FolderTransformBullet" />

    <TransformDefn class="com.microstrategy.web.app.transforms.PromptTransformPulldown" name="PromptTransformPulldown" />

    ...

  </TransformDefns>

  <LayoutSourceDefns>

    <LayoutSourceDefn name="AppLayoutSourceFile" class="com.microstrategy.web.app.transforms.AppLayoutSourceFile"/>

    <LayoutSourceDefn name="LayoutSourceFile" class="com.microstrategy.web.transform.LayoutSourceFile"/>

    <LayoutSourceDefn name="LayoutSourceString" class="com.microstrategy.web.transform.LayoutSourceString"/>

  </LayoutSourceDefns>

 

  <MapperDefns>

    <MapperDefn name="OutputFormatMapper" class="com.microstrategy.web.transform.OutputFormatStyleMapper" description="This mapper compares the output mode against the specified addl_data string." />

    ...

  </MapperDefns>

 

  <StyleMaps>

    <StyleMap from_style="PromptsTransformClassic">

      <MapCondition mapper="PromptsContainerGUIMapper" addl_data="2" to_style="PromptsContainerStyle_Widget" />

    </StyleMap>

    ...

  <StyleMaps>

 

  <Styles>

    <Style description="Style: Display Folder in icon view" name="FolderStyleIcon" transform="FolderViewTransform">

      <ActualParameters>

        <ActualParameter name="iframeEnabled" type="4" value="true"/>

        <ActualParameter name="cssPrefix" type="1" value=""/>

        <ActualParameter name="levelFlag" type="2" value="189311"/>

        <ActualParameter name="tableId" type="1" value="FolderIcons"/>

      </ActualParameters>

      <Layouts>

        <Layout layout_source="AppLayoutSourceFile" order="1"><![CDATA[/WEB-INF/xml/layouts/FolderIconLayout.xml]]></Layout>

      </Layouts>

    </Style>

  </Styles>    

</StyleCatalog>

Description

The table below describes the XML structure of the Style Catalog 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 class attribute for the <TransformDefn> element has an attribute type of "NMTOKEN" (name token) and is implied. The name attribute for the <Style> 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

<StyleCatalog>

- <BeanDefns>

- <LayoutParserDefns>

- <TransformDefns>

- <LayoutSourceDefns>

- <Styles>

1

 

The <StyleCatalog> element defines all of the styles, as well as the transforms, beans, and layout information to support these styles.

 

 

name

(CDATA / REQUIRED)

 

The name attribute provides the name of the configuration file.

 

 

description

(CDATA / " ")

The desc attribute provides an optional description of the configuration file.

 

 

version

(NMTOKEN  /"1.0")

The version attribute indicates the release number of the Style Catalog configuration file. This attribute is useful for backwards compatibility because it lets the application know what features are available.

<BeanDefns>

- <BeanDefn>

 

 

 

 

0 or 1

 

The <BeanDefns> element contains a list of individual bean definitions.

<BeanDefn>

 

0 or more

 

The <BeanDefn> element defines an individual bean.

 

 

 

name

(ID / REQUIRED)

The name attribute specifies the name of the bean.

 

 

class

(NMTOKEN / REQUIRED)

 

The class attribute specifies the class path for the bean.

 

 

 

description

(CDATA / " ")

The desc attribute provides an optional description for the bean.

<LayoutParserDefns>

- <LayoutParserDefn>

0 or 1

 

The <LayoutParserDefns> element contains a list of individual layout parser definitions.

 

 

 

global_parser

(IDREF / REQUIRED)

 

The global_parser attribute specifies the default parser to be used for the layout definition file if no specific parser is specified.

<LayoutParserDefn>

0 or more

 

The <LayoutParserDefn> element defines an individual layout parser definition.

 

 

name

(ID / REQUIRED)

The name attribute specifies the name of the layout parser.

 

 

class

(NMTOKEN / REQUIRED)

The class attribute specifies the class path for the layout parser.

<TransformDefns>

- <TransformDefn>

1

 

The <TransformDefns> element contains a list of individual transform definitions.

 

<TransformDefn>

 

1 or more

 

The <TransformDefn> element defines an individual transform.

 

 

name

(ID / REQUIRED)

The name attribute specifies the name of the transform.

 

 

 

class

(NMTOKEN / IMPLIED)

The class attribute specifies the class path for the transform.

 

 

progID

(NMTOKEN / IMPLIED)

The progID attribute specifies

 

 

layout_parser

(IDREF / REQUIRED)

The layout_parser attribute specifies the particular parser to be used for the layout definition file applied to the transform. This value overrides the default parser specified by the global_parser attribute of the <LayoutParserDefns> node.

<LayoutSourceDefns>

- <LayoutSourceDefn>

0 or 1

 

The <LayoutSourceDefns> element contains a list of individual layout source definitions.

<LayoutSourceDefn>

0 or more

 

The <LayoutSourceDefn> element defines an individual layout source definition.

 

 

name

(ID / REQUIRED)

The name attribute specifies the name of the layout source.

 

 

class

(NMTOKEN / IMPLIED)

The class attribute specifies the class path for the layout source.

<MapperDefns>

- <MapperDefn>

0 or 1

 

The <MapperDefns> element contains a list of individual definitions for mapping conditions.

<MapperDefn>

 

0 or more

 

The <MapperDefn> element defines an individual mapping condition.

 

 

name
(ID / REQUIRED)

The name attribute specifies the name of the style mapper.

 

 

class
(NMTOKEN / IMPLIED)

The class attribute specifies the class path for the style mapper.

 

 

description
(CDATA / " ")

The desc attribute provides an optional description for the style mapper.

<StyleMaps>

- <StyleMap>

0 or 1

 

The <StyleMaps> element contains a list of individual style map definitions.

<StyleMap>

- <MapCondition>

0 or more

 

The <StyleMap> element defines an individual mapping condition.

 

 

from_style
(ID / REQUIRED)

The from_style attribute specifies the name of the style that is being mapped.

<MapCondition>

0 or 1

 

The <MapCondition> element contains information about the style mapper to be used and the style to be used when the mapping condition is satisfied.

 

 

mapper
(ID / REQUIRED)

The <mapper> element defines the name of the style mapper to be used.

 

 

addl_data
(ID / REQUIRED)

The addl_data element specifies a string that the style mapper can use to check the mapping condition.

 

 

to_style
(ID / REQUIRED)

The to_style attribute specifies the name of the style to which the style defined in the from_style element  is being mapped.

<Styles>

- <Style>

1

 

The <Styles> element contains a list of individual styles.

 

<Style>

- <ActualParameters>

- <Layouts>

1 or more

 

The <Style> element defines an individual style.

 

 

name

(CDATA / REQUIRED)

The name attribute provides the name of the style.

 

 

description

(CDATA / " ")

The desc attribute provides an optional description for the style.

 

 

 

transform

(IDREF / IMPLIED)

The transform attribute specifies the transform used to render the style.

<ActualParameters>

- <ActualParameter>

0 or 1

 

The <ActualParameters> element contains a list of individual transform parameters.

<ActualParameter>

0 or more

 

The <ActualParameter> element defines an individual transform parameter.

 

 

 

name

(NMTOKEN / REQUIRED)

The name attribute specifies the name of the transform parameter.

 

 

 

type

(NMTOKEN / IMPLIED)

The type attribute specifies the type of the transform parameter, using the values shown below:

 

     0   Unknown

     1   String

     2   Integer

     3   Float

     4   Boolean

 

 

 

value

(CDATA / REQUIRED)

The value attribute specifies the value of the transform parameter.

 

 

order

(NMTOKEN / "0")

The order attribute specifies the order of the transform parameter.

 

 

source

(NMTOKEN / "constant")

The source attribute specifies the source of the transform parameter.

<Layouts>

- <Layout>

0 or 1

 

The <Layouts> element contains a list of individual layout definition files.

<Layout>

- <#PCDATA>

 

0 or more

 

The <Layout> element defines an individual layout definition file..

 

 

 

layout_source

(IDREF / REQUIRED)

The layout_source attribute specifies the source of the layout definition file.

 

 

order

(NMTOKEN  / REQUIRED)

The order attribute specifies the order in which the specified layout sources should be used.

 

<#PCDATA>

1