You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Palka <to...@vanion.com> on 2000/05/10 07:09:05 UTC
HTML end tags don't appear in generated pages
Hello, I'm using Cocoon 1.7.3 with Apache 1.3.12 on a Win2k machine. It
was very simple to setup, and now I'm following some of the examples. One
of the examples that I tried involves an imagemap. The problem that I'm
running into is that some of the HTML tags that I specified in the XSL
file don't show up in the generated HTML output. In my particular example
I see it with the imagemap -- the <MAP> tag shows up, but not the </MAP>.
That, of course, causes the imagemap not to work. Other simpler examples
involve the LI tag. Here is some sample code:
========= simple.xml ============
<?xml version="1.0"?>
<?xml-stylesheet href="simple-html.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<page>
<item>item</item>
</page>
=================================
========== simple-html.xsl ======
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="page">
<xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
<html><body>
<xsl:apply-templates/>
</body></html>
</xsl:template>
<xsl:template match="item">
<ul><li>
<xsl:apply-templates/>
</li></ul>
</xsl:template>
</xsl:stylesheet>
=================================
The output from Cocoon is:
=================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html><body>
<ul><li>item</ul> <==== NOTE THE MISSING </LI> tag
</body></html>
<!-- This page was served from cache in 0 milliseconds by Cocoon 1.7.3 -->
=================================
The </LI> tag from the XSL file is not there. I looked through the FAQ,
looked through the mailing list archive, and didn't find anything
relevant. Running the com.jclark.xsl.sax.Driver XSLT program on the same
inputs generates the output I expected. How come Cocoon is generating
something different?
Thank you,
Thomas Palka
Re: HTML end tags don't appear in generated pages
Posted by Stefano Mazzocchi <st...@apache.org>.
Thomas Palka wrote:
>
> Hello, I'm using Cocoon 1.7.3 with Apache 1.3.12 on a Win2k machine. It
> was very simple to setup, and now I'm following some of the examples. One
> of the examples that I tried involves an imagemap. The problem that I'm
> running into is that some of the HTML tags that I specified in the XSL
> file don't show up in the generated HTML output. In my particular example
> I see it with the imagemap -- the <MAP> tag shows up, but not the </MAP>.
> That, of course, causes the imagemap not to work. Other simpler examples
> involve the LI tag. Here is some sample code:
>
> ========= simple.xml ============
> <?xml version="1.0"?>
> <?xml-stylesheet href="simple-html.xsl" type="text/xsl"?>
> <?cocoon-process type="xslt"?>
> <page>
> <item>item</item>
> </page>
> =================================
>
> ========== simple-html.xsl ======
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="page">
> <xsl:processing-instruction
> name="cocoon-format">type="text/html"</xsl:processing-instruction>
> <html><body>
> <xsl:apply-templates/>
> </body></html>
> </xsl:template>
> <xsl:template match="item">
> <ul><li>
> <xsl:apply-templates/>
> </li></ul>
> </xsl:template>
> </xsl:stylesheet>
> =================================
>
> The output from Cocoon is:
>
> =================================
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
> "http://www.w3.org/TR/REC-html40/strict.dtd">
> <html><body>
> <ul><li>item</ul> <==== NOTE THE MISSING </LI> tag
> </body></html>
> <!-- This page was served from cache in 0 milliseconds by Cocoon 1.7.3 -->
> =================================
>
> The </LI> tag from the XSL file is not there. I looked through the FAQ,
> looked through the mailing list archive, and didn't find anything
> relevant. Running the com.jclark.xsl.sax.Driver XSLT program on the same
> inputs generates the output I expected. How come Cocoon is generating
> something different?
You're lucky, man :)
XercesJ 1.0.4 is out and fixes this problem.
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<st...@apache.org> Friedrich Nietzsche
--------------------------------------------------------------------
Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------