<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <html> <head> <title>VFP Report HTML <xsl:value-of select="/Reports/VFP-Report/VFP-RDL/@id"/> </title> <xsl:comment> Transformed by report2simplehtml.xslt, a very simple XSLT, suitable for use in VFP-Report XML via HTMLListener class. (c) Lisa Slater Nicholls </xsl:comment> </head> <body bgcolor="white"> <table width="95%" border="0" align="center"> <xsl:apply-templates select="/Reports/VFP-Report[1]/Data/PH[1]"/> <xsl:apply-templates select="/Reports/VFP-Report[1]/Data/D"/> </table> </body> </html> </xsl:template> <xsl:template match="PH"> <tr> <xsl:for-each select="./T"> <th><xsl:value-of select="."/></th> </xsl:for-each> </tr> </xsl:template> <xsl:template match="D"> <tr> <xsl:for-each select="./E"> <td><xsl:value-of select="."/></td> </xsl:for-each> </tr> </xsl:template> </xsl:stylesheet>Meanwhile, XMLListener and its descendents make XSLT pretty darned easy to use.
DO (_REPORTOUTPUT) WITH 5, "ox" ox.xsltProcessorUser = "c:\temp\simple.xslt" * it will intelligently handle a filename, * a string, or a processor object REPORT FORM ? object ox>L<