Title: Bericht
Yes sorry, my fault. I was using the default configuration of cocoon 2.1.7
 
    <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml" pool-max="64" src="">
 
I was not aware of the xhtmlserializer class in blocks/serializers. Now I am! Thx.
 
Kees
-----Oorspronkelijk bericht-----
Van: Antonio Fiol Bonnín [mailto:[EMAIL PROTECTED]
Verzonden: Tuesday, August 02, 2005 12:16 PM
Aan: dev@cocoon.apache.org; [EMAIL PROTECTED]
Onderwerp: Re: Suggestion for XHTMLSerializer

Maybe I read the code the wrong way. What I understood was:

   public void endElementImpl(String uri, String local, String qual) throws SAXException {
[...]
        if (XHTML1_NAMESPACE.equals(uri)) {
            if ((local.equalsIgnoreCase("textarea")) ||
                (local.equalsIgnoreCase("script")) ||
                (local.equalsIgnoreCase("style"))) {
                this.closeElement(false); // This line should cause the [<script] to become [<script>]
            } else if (local.equalsIgnoreCase("head")) {
[...]
            }
        }
        super.endElementImpl(uri, local, qual); // And thus this line should close the element with [</script>]
    }

So my proposal would be to add a line like
(local.equalsIgnoreCase("div")) ||
for each element that should share this behaviour.

BTW, the source I am looking at is the one in Cocoon 2.1.7. I checked on http://svn.apache.org/repos/asf/cocoon/blocks/serializers/trunk/java/org/apache/cocoon/components/serializers/XHTMLSerializer.java
and the relevant part of the code is the same.

--
Antonio


2005/8/2, Kees Broenink <[EMAIL PROTECTED]>:
Hello,

Adding to this is an issue with IE and the <script> tag. I did not
search the mail archive nor bugzilla, so maybe it is already addressed
for the next release.

The xhtml serializer will change
  <script type="text/_javascript_" src=""></script>
into
  <script type="text/_javascript_" src=""/>

This will break loading the JS in IE.

Kees


-----Oorspronkelijk bericht-----
Van: Antonio Fiol Bonnín [mailto:[EMAIL PROTECTED]]
Verzonden: Tuesday, August 02, 2005 11:26 AM
Aan: dev@cocoon.apache.org
Onderwerp: Suggestion for XHTMLSerializer


Hello,

I am finding a problem with empty elements when serving content with the
text/html content type on Firefox. For example, collapsed empty div
elements cause havoc in firefox. A possible workaround would be
implementing the compatibility guidelines indicated in the W3C
recommendations.

In particular, I would add the same check already present for style,
script and textarea for any element whose end tag is required in HTML
4.01.

Would a patch for this be welcome?

Yours,

--
Antonio



Reply via email to