A
Arun dudee
I have a xml and xsl file when i run the xml in IE ^ and firefox i
have differnt kind of layout for my page.In firefox it gives me what i
want but not in iE please help.This my code
XML FILE
file name goa.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="goa.xsl"?>
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<catalog>
<link>
<title>google</title>
<url>http://www.google.com </url>
</link>
<link>
<title>Picture book</title>
<url>http://www.google.com</url>
</link>
<link>
<title>yahoo</title>
<url>http://www.yahoo.com</url>
</link>
<link>
<title>yahoomail</title>
<url>http://www.yahoo.com</url>
</link>
<img>
<src>file:///c:/banner.GIf</src>
</img>
<mimg>
<src>file:///c:/main.GIF</src>
</mimg>
<simg>
<src>file:///c:/a.GIF</src>
</simg>
<simg>
<src>file:///c:/b.GIF</src>
</simg>
<simg>
<src>file:///c:/c.GIF</src>
</simg>
<simg>
<src>file:///c:/d.GIF</src>
</simg>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
</catalog>
---------------------------------------------------------------------------------------------
XSL FILE
file name goa.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method='html' version='1.0' encoding='UTF-8' indent='yes'/
<xsl:template match="/">
<html>
<body>
<table border="1">
<th align="left">menu</th>
<tr>
<table border="1">
<xsl:for-each select="catalog/link">
<tr>
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="url"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td>
</tr>
</xsl:for-each>
<xsl:for-each select="catalog/img">
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="src"/></
xsl:attribute>
</img>
</td>
</tr>
</xsl:for-each>
</table>
<td><!-- this td is for main side -->
<xsl:for-each select="catalog/mimg">
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="src"/></
xsl:attribute>
</img>
</td>
</tr>
</xsl:for-each>
<xsl:for-each select="catalog/maintext">
<tr>
<td>
<xsl:value-of select="text"/>
</td>
</tr>
</xsl:for-each>
<xsl:for-each select="catalog/simg">
<td><td>
<img>
<xsl:attribute name="src"><xsl:value-of select="src"/></
xsl:attribute>
</img>
</td></td>
</xsl:for-each>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
have differnt kind of layout for my page.In firefox it gives me what i
want but not in iE please help.This my code
XML FILE
file name goa.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="goa.xsl"?>
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<catalog>
<link>
<title>google</title>
<url>http://www.google.com </url>
</link>
<link>
<title>Picture book</title>
<url>http://www.google.com</url>
</link>
<link>
<title>yahoo</title>
<url>http://www.yahoo.com</url>
</link>
<link>
<title>yahoomail</title>
<url>http://www.yahoo.com</url>
</link>
<img>
<src>file:///c:/banner.GIf</src>
</img>
<mimg>
<src>file:///c:/main.GIF</src>
</mimg>
<simg>
<src>file:///c:/a.GIF</src>
</simg>
<simg>
<src>file:///c:/b.GIF</src>
</simg>
<simg>
<src>file:///c:/c.GIF</src>
</simg>
<simg>
<src>file:///c:/d.GIF</src>
</simg>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
<maintext>
<text>this is text for main page from xml </text>
</maintext>
</catalog>
---------------------------------------------------------------------------------------------
XSL FILE
file name goa.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method='html' version='1.0' encoding='UTF-8' indent='yes'/
<xsl:template match="/">
<html>
<body>
<table border="1">
<th align="left">menu</th>
<tr>
<table border="1">
<xsl:for-each select="catalog/link">
<tr>
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="url"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td>
</tr>
</xsl:for-each>
<xsl:for-each select="catalog/img">
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="src"/></
xsl:attribute>
</img>
</td>
</tr>
</xsl:for-each>
</table>
<td><!-- this td is for main side -->
<xsl:for-each select="catalog/mimg">
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="src"/></
xsl:attribute>
</img>
</td>
</tr>
</xsl:for-each>
<xsl:for-each select="catalog/maintext">
<tr>
<td>
<xsl:value-of select="text"/>
</td>
</tr>
</xsl:for-each>
<xsl:for-each select="catalog/simg">
<td><td>
<img>
<xsl:attribute name="src"><xsl:value-of select="src"/></
xsl:attribute>
</img>
</td></td>
</xsl:for-each>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>