cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matteo <>
Subject Trouble transforming EMPTY tag [Cocoon 2.1.4]
Date Sat, 03 Jan 2004 13:11:25 GMT
Problem description:
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):

here is the XSL stylesheet (test2html.xsl)
<xsl:stylesheet xmlns:xsl="">
    <xsl:template match="page">
            <xsl:apply-templates select="logo"/>
    <xsl:template match="logo">
        <img src="data/image/oilogo.jpg" alt="logo"></img>

here is the sitemap entry for the page (extract from sitemap.xmap):
            <map:match pattern="test.htm">
                <map:generate src="laos/xml/test.xml"/>
                <map:transform src="laos/xsl/test2html.xsl"/>
                <map:serialize type="html"/>

here is the resulting html code from transformation (test.htm):

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<img alt="logo" src="data/image/oilogo.jpg"></body>

Any clue why the <img> doesn't end with <img/>?
Thanks in advance for the help!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message