On 25 May 2007, at 16:07, Grzegorz Kossakowski wrote:

As for serializing to XHTML. First of all you must be aware that browsers will not treat XHTML as XHTML pages because of content type set to "text/html" instead of "text/xhtml". It is done so because IE (sigh) does not understand "text/xhtml". Given that, browsers interpret XHTML as HTML code and it usually works but not for empty elements because in html there was no such a construct
<script src="..."/>

We are finally near to the problem, AJAX does not work because js- libraries are not being loaded correctly because script tag is not parsed correctly. As a workaround, you can add comment/dummmy character inside all empty elements in resulting XHTML. It's really basic tip.

There were lots of discussions related to this issue so maybe you can find some neat solution in archives. Some pointers:
http://thread.gmane.org/gmane.text.xml.cocoon.user/58517
http://thread.gmane.org/gmane.text.xml.cocoon.user/34237

And this especially interesting for you:
http://thread.gmane.org/gmane.text.xml.cocoon.user/60301


See also: http://www.hixie.ch/advocacy/xhtml - Sending XHTML as text/ html Considered Harmful

Ellis.

Reply via email to