Hi,
I am having a problem transforming the xml response of
my .net webservice to html using xsl - I get a blank
screen. The odd part is that when I remove the final
namespace of the 'StockTest' root element it works fine.
As far as I know, I cannot remove the namespace from the
xml response. Can anyone help?
Here is the xml response:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="response.xsl"?>
<StockResponse
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://phil/">
<Supplier>
<SupplierCode>JAYM</SupplierCode>
<SupplierName>JAYAR Maidstone</SupplierName>
<AccessLevel>Price only</AccessLevel>
<Comment>OK</Comment>
<Part>
<PartId>xxxx</PartId>
<Response>OK</Response>
<Stock>951</Stock>
<Price>0</Price>
</Part>
</Supplier>
<Supplier>
<SupplierCode>xxxx</SupplierCode>
<SupplierName>xxxx</SupplierName>
<AccessLevel>Price only</AccessLevel>
<Comment>OK</Comment>
<Part>
<PartId>xxxx</PartId>
<Response>OK</Response>
<Stock>951</Stock>
<Price>0</Price>
</Part>
</Supplier>
</StockResponse>
Here is the xsl:
<?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>
<xsl:for-each select="StockResponse/Supplier">
<table border="1" style="margin-
bottom:10px">
<tr>
<td>Supplier Code</td>
<td><xsl:value-of
select="SupplierCode"/></td>
</tr>
<tr>
<td>Supplier Name</td>
<td><xsl:value-of
select="SupplierName"/></td>
</tr>
<tr>
<td>Access Rights</td>
<td><xsl:value-of
select="AccessLevel"/></td>
</tr>
<tr>
<td>Comment</td>
<td><xsl:value-of
select="Comment"/></td>
</tr>
</table>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Thanks in advance,
Phil