| View previous topic :: View next topic |
| Author |
Message |
Crazy Horse's crazier lit Guest
|
Posted: Wed Jul 20, 2005 2:12 pm Post subject: XML reports? |
|
|
Is there a tool that will take an xml file (such as one saved from a cds),
and build--voila!--a report from it, something like an html table
(automatically adding table column headings based on database column names).
--
Download Blackbird Crow Raven's book
"STILL CASTING SHADOWS: Two American Families 1620-2006"
(.exe and .pdf): http://cc.borland.com/ccweb.exe/listing?id=23106
|
|
| Back to top |
|
 |
Matthew Jones Guest
|
Posted: Wed Jul 20, 2005 2:21 pm Post subject: Re: XML reports? |
|
|
XSLT can do this sort of thing. The old Turbopower one worked okay, and
there is the Microsoft one too.
/Matthew Jones/
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Wed Jul 20, 2005 2:46 pm Post subject: Re: XML reports? |
|
|
All what you need is to add the xsl-file for your xml (produced by
TClientDataset).
Use the next contents for xsl-file:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="DATAPACKET">
<table border="1">
<xsl:apply-templates select="METADATA/FIELDS"/>
<xsl:apply-templates select="ROWDATA/ROW"/>
</table>
</xsl:template>
<xsl:template match="FIELDS">
<tr>
<xsl:apply-templates/>
</tr>
</xsl:template>
<xsl:template match="FIELD">
<th>
<xsl:value-of select="@attrname"/>
</th>
</xsl:template>
<xsl:template match="ROWDATA/ROW">
<tr>
<xsl:for-each select="@*">
<td>
<xsl:value-of/>
</td>
</xsl:for-each>
</tr>
</xsl:template>
</xsl:stylesheet>
PS: you may use the TSMExportToXML component SMExport suite:
http://www.scalabium.com/sme
There is the option to generate the xsl-file for exported xml and also there
is the option to generate the xml-file compartible with TClientDataset's xml
--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com
"Crazy Horse's crazier little brother"
<cshannonKeinSpamBitteMitZuckerDrauf (AT) d4sw (DOT) com> wrote
| Quote: | Is there a tool that will take an xml file (such as one saved from a cds),
and build--voila!--a report from it, something like an html table
(automatically adding table column headings based on database column
names).
--
Download Blackbird Crow Raven's book
"STILL CASTING SHADOWS: Two American Families 1620-2006"
(.exe and .pdf): http://cc.borland.com/ccweb.exe/listing?id=23106
|
|
|
| Back to top |
|
 |
|