Hi,
I am trying to view some images in Cocoon but it does not work. When I try the files (XML and XSL) outside the Cocoon environment it work fine (i.e. the image is displayed on the browser)
The XML file is like:
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href=""?>
<!--I disable the above line when I use this file inside Cocoon -->
<info> logo.gif </info>
The XSL file is like:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="info">
<html>
<body>
<img>
<xsl:attribute name="src"><xsl:value-of select="."/></xsl:attribute>
</img>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The resulted page looks fine when I use the XML serializer, it looks like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<html>
<body>
<img src=""/>
</body>
</html>
But when I use the HTML serializer to display the actual image I get nothing and the view source for the resulted page looks like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<img src=""></body>
</html>
I am wondering why I get nothing and surprisingly get the loose.dtd file although I have not use any dtd files.
Any suggestions?
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
