Extensible Markup Language (XML) is a format for describing structured data. Through the use of Extensible Stylesheet Language (XSL) transformations, it is possible to transform XML data understood by one application, into XML data understood by another application.
MCReport's Custom List report has an option to produce XML, and optionally apply an XSL transformation. MTE is supplied with several XSL samples, so an understanding of XML/XSL is not necessarily a requirement.
The included XSL samples transform the Custom List XML into the following XML formats:
-
HTML (Internet Explorer 6, Word XP/2003)
-
Spreadsheet ML (Excel XP/2003)
-
Database Table XML (simple Table/Row/Column structure)
The option to output a Custom List report in XML can be found in the XML page of the Custom List Properties. When the report is calculated, MCReport will display the raw Custom List XML.
This page also contains a list of available XSL transforms (found in your User \ XML folder) to associate with the Custom List XML. This can be seen as an XML Processing Instruction at the start of the Custom List XML, which will be used by the XSL processor. For example, <?xml-stylesheet type="text/xsl" href="ExcelPaged.xsl" ?>.
MCReport provides two options for processing your Custom List XML, which can be found in the Tools menu:
-
Preview XSL transform
-
Apply XSL transform
In Preview mode, MCReport examines your chosen stylesheet for a PrimaryTarget XSL parameter. This is a Program ID of the application to which MCReport will pass the Custom List XML for processing. For example, <xsl:param name="PrimaryTarget">Excel.Sheet</xsl:param> will launch Excel. The target application detects the Stylesheet embedded in the Custom List XML, performs the XSL transform, and imports the result.
If a PrimaryTarget is not specified in the XSL transform, MCReport will launch the default application associated with XML files.
In Apply mode, MCReport passes the Custom List XML and the selected Stylesheet to a XSL Processor, which is installed with MTE. This writes the transformed XML to a separate file, which can then be double-clicked, or manually imported into an application.