I'm trying to broaden the content on my website somewhat and have been approached by a third party to publish content available via their XML feeds which they make available to selected parties. I understand I need to create an XSL stylesheet.
I have very little experience in this area and have been struggling for the last couple of days. I've worked through a few online tutorials and examples and managed to get them to work no problem. The issue is I don't seem to be able to apply the knowledge I've acquired to the XML feed I need to process.
Below is an extract from the XML feed and the simple XSL sheet I've created. It returns no content what so ever. If I change the template match to xyz it returns all the data contained the the XML file. Any advice as to where I'm going wrong would be much appreciated.
Website domain removed.
- <Loans xmlns="http://api.example.com">
- <Product xmlns="">
<CategoryName>Standard Loans</CategoryName>
<OrderId>2</OrderId>
<LoanName>Sainsbury's Personal Loan</LoanName>
<LoanComments>Nectar card holders receive double Nectar points for 2yrs on £7.5k-£14,999. <b>Typical APR 7.2%</b></LoanComments>
<LoanAmount>10000.00</LoanAmount>
<LoanDuration>4</LoanDuration>
<Apr>7.2</Apr>
<InterestRate>7.20</InterestRate>
<FeeAmount p2:nil="true" xmlns:p2="http://www.w3.org/2001/XMLSchema-instance" />
<MonthlyPayment>239.34</MonthlyPayment>
<TotalChargeForCredit>1488.00</TotalChargeForCredit>
<TotalAmountPayable>11488.00</TotalAmountPayable>
<MinAdvance>7500.00</MinAdvance>
<MaxAdvance>14999.00</MaxAdvance>
<DetailsUrl>http://www.example.com</DetailsUrl>
<ApplyUrl>http://www.example.com</ApplyUrl>
<ProviderSiteUrl>http://www.example.com/loans/LoansExternalDb_new.asp?BestBuy=1&Source=bbt&LoansID=1562</ProviderSiteUrl>
<LogoUrl>http://www.example.com/images/Sainsburys100.gif</LogoUrl>
<IsSecured>false</IsSecured>
<IsFixedRate>true</IsFixedRate>
<HeadlineApr>7.20</HeadlineApr>
</Product>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="Product">
<div class="deal">
<xsl:value-of select="LoanName"/>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>