Strategy ONE

Paper Sizes Configuration File XML Structure

The paper sizes configuration file includes a series of paper size definitions, which are used to define the valid sizes of pages that the application presents to the user when the print functionality is invoked.

Paper size configuration settings are generally set in the paperSizes.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, regardless of whether you make the settings in paperSizes.xml or in pageConfig.xml.

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

XML structure

<paper-sizes version="1.0">

    <paper-size custom_desc_id="" desc="Letter 8.5&quot; x 11&quot;" desc_id="29" desktop-key="1" key="Letter,8.5,11"/>

    ...

    <paper-size custom_desc_id="" desc="A5 5.83&quot; x 8.27&quot;" desc_id="" desktop-key="7" key="A5,5.83,8.27"/>

</paper-sizes>

Description

The table below describes the XML structure of the paper sizes 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 <paper-sizes> element has an attribute type of "nmtoken" (name token) and is implied. The key attribute for the <paper-size> 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

<paper-sizes>

- <paper-size>

 

1

 

 

The <paper-sizes> element lists a series of paper size definitions. These <paper-size> elements are used to define the valid sizes of pages that the application presents to the user when the print functionality is used. (When you use a separate configuration file, the <paper-sizes>element represents the root element of the file.)

config-src

(cdata / implied)

If the valid paper sizes are defined in a separate file, the config-src attribute tells the page configuration file the location of the paper size configuration file.

version

(nmtoken / implied)

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

<paper-size>

1 or more

 

 

The <paper-size> element defines a single valid paper size. The application presents this paper size to the user when the print functionality is used.

desc

(cdata / implied)

The desc attribute provides the descriptor that the application should use to display the paper size 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 paper size descriptor in the language of the user's locale.

desktop-key

(nmtoken / implied)

The desktop-key attribute is a unique identifier used by MicroStrategy Developer to identify the paper size.

key

(cdata / required)

The key  attribute is a unique identifier used by MicroStrategy Web to identify the paper size.

See also