BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

XML reports?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Crazy Horse's crazier lit
Guest





PostPosted: Wed Jul 20, 2005 2:12 pm    Post subject: XML reports? Reply with 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
Matthew Jones
Guest





PostPosted: Wed Jul 20, 2005 2:21 pm    Post subject: Re: XML reports? Reply with quote



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





PostPosted: Wed Jul 20, 2005 2:46 pm    Post subject: Re: XML reports? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.