When a try to transform an empty tag from an XML content to an HTML formatting the resulting tag in the HTML page has not the closing part.
Code Example (this example is semplified but I tested it doesn't work the same way the original problem):
here is the XML file with the content (test.xml): <page> <logo/> </page>
here is the XSL stylesheet (test2html.xsl) <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> <html> <head> <title>test</title> </head> <body> <xsl:apply-templates select="logo"/> </body> </html> </xsl:template> <xsl:template match="logo"> <img src="data/image/oilogo.jpg" alt="logo"></img> </xsl:template> </xsl:stylesheet>
here is the sitemap entry for the page (extract from sitemap.xmap):
<map:pipeline>
<map:match pattern="test.htm">
<map:generate src="laos/xml/test.xml"/>
<map:transform src="laos/xsl/test2html.xsl"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>here is the resulting html code from transformation (test.htm):
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>test</title> </head> <body> <img alt="logo" src="data/image/oilogo.jpg"></body> </html>
Any clue why the <img> doesn't end with <img/>? Thanks in advance for the help!
Matteo
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
