Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: absolut beginner request help with xslt Write! absolut beginner request help with xslt Write!To: NULL Date: 10/10/2007 9:53:00 PM
Hi there
I have an xml file, fo which I want to import the data to Access 2003.
As I amnot getting the format that I am looking for, I want to use
xslt to transform the data. The initial start got me to produce the
header out put format but not the rest. I was wondering weather
someone could hint me over the next hurdle? or point me to a site that
has some tutorial. any hints are wellcome
here is what I have got;
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table width="100%" border="1" bgcolor="LemonChiffon">
<tr bgcolor="#9acd32">
<th align="left">POLICY_NUMBER</th>
<th align="left">START_DATE</th>
<th align="left">EXPIRY_DATE</th>
<th align="left">RISK_STATE</th>
<th align="left">PAYMENT_DATE</th>
<th align="left">BRANCH_ID</th>
<th align="left">PREMIUM</th>
<th align="left">FLS</th>
<th align="left">GST</th>
<th align="left">SD</th>
<th align="left">COM</th>
<th align="left">AGENT_FEE</th>
<th align="left">AGENT_FEE_GST</th>
<th align="left">CANCELLATION_FEE</th>
</tr>
<xsl:for-each select="PAYMENTS">
<xsl:for-each select="INSTALLMENT_PAYMENT">
<tr>
<td><xsl:value-of select="POLICY_NUMBER"/></td>
<td><xsl:value-of select="START_DATE"/></td>
<td><xsl:value-of select="EXPIRY_DATE"/></td>
<td><xsl:value-of select="RISK_STATE"/></td>
<td><xsl:value-of select="PAYMENT_DATE"/></td>
<td><xsl:value-of select="BRANCH_ID"/></td>
<td><xsl:value-of select="PREMIUM"/></td>
<xsl:for-each select="FEES">
<td>
<xsl:value-of select="TOTAL_FEE_AMOUNT"/>
</td>
<td>
<xsl:value-of select="TOTAL_FEE_AMOUNT"/>
</td>
<td>
<xsl:value-of select="TOTAL_FEE_AMOUNT"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
and her is the detail section of the xml file:
<HEADER>
some stuff here
</HEADER>
<PAYMENTS>
<INSTALLMENT_PAYMENT>
<POLICY_NUMBER>HMGW100289</POLICY_NUMBER>
<START_DATE>20070810</START_DATE>
<EXPIRY_DATE>20080810</EXPIRY_DATE>
<RISK_STATE>NSW</RISK_STATE>
<PAYMENT_DATE>20070712</PAYMENT_DATE>
<BRANCH_ID>1519322</BRANCH_ID>
<PREMIUM>-24.18</PREMIUM>
<FEES>
<FEE_DESCR>FSL</FEE_DESCR>
<TOTAL_FEE_AMOUNT>-2.86</TOTAL_FEE_AMOUNT>
</FEES>
<FEES>
<FEE_DESCR>GST</FEE_DESCR>
<TOTAL_FEE_AMOUNT>-2.02</TOTAL_FEE_AMOUNT>
</FEES>
<FEES>
<FEE_DESCR>SD</FEE_DESCR>
<TOTAL_FEE_AMOUNT>-2</TOTAL_FEE_AMOUNT>
</FEES>
<COMMISSION>-3.46</COMMISSION>
<AGENT_FEE>0</AGENT_FEE>
<AGENT_FEE_GST>0</AGENT_FEE_GST>
<CANCELLATION _FEE>20</CANCELLATION _FEE>
</INSTALLMENT_PAYMENT>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
