cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: serving css and images
Date Sat, 09 Aug 2003 08:29:09 GMT
Ben Munat wrote:
> Thanks! The Cocoon Developer's Handbook doesn't seem to mention an xhtml 
> serializer anywhere... frustrating.

The so called XHTML serializer is in Cocoon's main sitemap since 2.0.2. 
It is maybe not mentioned because the book is too old (IIRC it reflects 
the status of 2.0.1/2.0.2) or because it's only a configured XML serializer.

> And I wonder, does it only work with 
> certain versions of cocoon? I'm running 2.0.4 and changed the serializer 
> on that page to xhtml, but I still don't get a doctype and the mime-type 
> is still text/html.

text/html is ok, it's configured so (have a look into Cocoon's root 
sitemap) and it matches the spec. You should also get a doctype, don't 
know why not.

> Oh, and the program I used to write the xsl stuck the fo ns in there... 
> didn't even notice it... thanks.

Even if it is in the document, it should not matter until you validate 
the page against the strict HTML spec, the validation against strict 
XHTML spec should not claim about the namespace declaration.


> Joerg Heinicke wrote:
>> Hello Ben,
>> Cocoon has a so called XHTML serializer, which is in fact a XML 
>> serializer, but adds the correct mime-type and the DOCTYPE, so that 
>> Mozilla correctly recognizes the page as XHTML. So you should use
>> <map:serialize type="xhtml"/>
>> The XSL FO namespace declaration comes from your stylesheet I guess - 
>> and the serializer does not remove it, but it does not add ns 
>> declarations by magic. The ns declaration has no influence on the mime 
>> type recognition of Mozilla, but the wrong mime-type text/xml of the 
>> XML serializer has.
>> Regards,
>> Joerg
>> Ben Munat wrote:
>>> Thanks for all the replies. I must have been pretty fuzzy last night 
>>> to miss the fact that I hadn't changed the image map:match to the 
>>> correct source and mime type! Thus are the dangers of cut & paste 
>>> (yank & put, actually).
>>> I've gotten it to find the image and stylesheet now, but I had to 
>>> change the serializer to html. Don't I want to use the xml serializer 
>>> to get xhtml output? Cocoon is also putting this namespace on my html 
>>> tag:
>>> <html xmlns:fo="">
>>> which is what, I think, was making mozilla interpret the file as xml 
>>> and hence not retrieve the stylesheet and image or even render the 
>>> html, for that matter. Once I changed the serializer to html, it put in:
>>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>>> so now mozilla treats it as html (even though the fo ns declaration 
>>> is still there). I don't know that it matters that much, though I'd 
>>> like to know why I'm getting that ns added... and for that matter, 
>>> isn't there a way to have cocoon insert an xhtml dtd into the output 
>>> file?
>>> Thanks for all your help.
>>> Ben Munat

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

View raw message