共用方式為


Extracting the VFP 9.0 report system XSLT document

When any VFP 9.0 report uses HTML output, the VFP 9.0 report system creates an XML output file and then uses one XSLT document (generic for all report outputs) to convert that XML to HTML. You can actually extract this XSLT file using the code below and store it as an independent file (example creates a file in the VFP home directory). You can then use MSXML or System.Xml in .NET to transform any VFP 9.0 XML report output to HTML using that XSLT programmatically. Or you can copy this XSLT to a new XSLT file and modify it for your own custom report output from XML to a different type of HTML file, or any XML type like Word XML, RSS, or any XML format. 

LOCAL oHTMLListener,cXSLT
oHTMLListener=NEWOBJECT("HTMLListener",HOME()+"FFC\_ReportListener.vcx")
cXSLT=oHTMLListener.XsltProcessorUser.Stylesheet.xml
STRTOFILE(cXSLT,HOME()+"VFPRptHTML.xsl")
RETURN