This documentation is archived and is not being maintained.

Example of Using ASP and XSL to Create a Custom HTML Report

Visual Studio .NET 2003

View information about the sample


This example shows how to generate HTML pages directly from the report XML using an XSL transformation.

Creating an HTML report directly from the XML report data could be useful when publishing test results to your intranet for others to see. This sample dynamically updates the links as new XML files are created, so it is not necessary to manually update the Web page after each test run.

Setting up the Files

To run the sample files, you will need to create a directory that contains Application Center Test (ACT) reports, and all of the following sample files:

  • ListXMLFiles.asp
  • TransformXML.asp
  • ACTReport.xsl
  • ACTstyles.css
  • banner.gif
If the ACT computer also has IIS installed, you can place the sample files directly in an ACT project directory. Reports from that project will be available online as soon as they are created. Next, create an IIS virtual directory that points to the directory with the reports and sample files. The virtual directory permissions must be set to allow ASP pages to run. The IIS computer will need at the Microsoft XML parser, version 2 or later.

In ListXMLFiles.asp and TransformXML.asp, you will need to edit the ACT_FOLDER constant. The constant specifies the path for the directory you will be using to store the reports and sample files.

How it Works

The sample uses two separate ASP pages. The page ListXMLFiles.asp generates a list of links showing all XML report files. Clicking a report name will load the second ASP page, TransformXML.asp. TransformXML.asp transforms the XML report into HTML using an XSL stylesheet appropriate for that particular type of document.

This simple example shows how a basic HTML report can be made. More sophisticated ASP and XSL can generate pages for other ACT documents, or sort and filter data before displaying it. XML-to-XML transformations are also possible, and they might be useful in situations where a custom application requires report data, and sending the information using an HTTP connection would make it possible to gather the data from any location connected to the Internet.

See Also

Analyzing the Standard Reports | MSDN Online XML Developer Center