Customize the Appearance of View Analysis XML Output Files

You can easily change the appearance of background colors, fonts, and titles in XML files that you create when using the View Analysis to XML command. When you run View Analysis to XML, seven files are created if they are not already present in the output folder. These files work together to produce the XML output. To perform simple changes to the XML you need to edit three different files: the XML file, the CSS file which determines fonts and background colors, and the XSL file which formats the data output.

Most of the background colors and fonts that are used in the XML are determined by styles in the ViewAnalysis.css file. To change the appearance of all sections except the data content area , update the styles in the css file. The best way to edit css files is by using a css-editing tool such as Topstyle Pro. With tools such as this, you can easily create and update styles and show a preview of the style’s appearance.

image\XML.gif

Changing the Title, Date, and Time fields

  • The title format and background color use Header1 style in the .css file. Update that style to change it.
  • The date/time created fields use Header2 in the .css file. Update the style to change it.
  • The title text comes from the XML file and combines "Summary for" with the name of the view.
  • To change the text of the title and the date and time created fields, edit the following section in the XML file:

<AnalysisTitle>Summary for view Manage Condition Assessment Items</AnalysisTitle>
<DateCreated>11/06/03</DateCreated>
<TimeCreated>12:27:49pm</TimeCreated>

Changing the heading text and background colors for list and cross- tab reports

  • Headers in List reports: Edit Header3 style in the .css file.
  • Headers in Cross tab reports: Edit Header3 style for the first sort field and Header4 style for the second sort field.
  • Summary sections: Edit SummaryBand style.

Changing the data content section in list and cross tab reports

  • The data content area is based on a table definition in the XSL file. The background colors in the data content area is an attribute of the table. The XSL bgcolor attribute is "cornsilk" (shown below).

<table style="border-collapse: collapse" width="100%" bgcolor="cornsilk" cellpadding="3">

  • The font for the data in the report can be changed by editing the Content style in the .css file.
  • Mouse-over color: To change the color of the data content when the mouse passes over it, edit this attribute in the XSL file:

<xsl:attribute name="onMouseOver">style.color='red';</xsl:attribute>

Choosing colors

When customizing colors in the XSL file, you can enter basic color names such as "red". However, for more choices you can enter the colors using hexidecimal notation (e.g., #0000FF for royal blue) since many custom color names are not recognized. For details on using colors for Web presentation, go to http://www.w3schools.com/css/css_colors.asp. For a list of color names, see http://www.w3schools.com/css/css_colornames.asp.

This site also has several introductory tutorials on how to work with XML, XSL, and CSS files.