logo       

Re: xhtml compatibility guideline: msg#00048

java.enhydra.xmlc

Subject: Re: xhtml compatibility guideline


The appropriate mime-type for xhtml is: application/xhtml+xml

However, browsers (other than Mozilla...maybe Opera 7?) don't recognize that.  So, the only real way to serve it up for stupid browsers (read IE here) is to send it as text/html.

I would think you should be able to set the mime type on your own.  I don't use Enhydra, so I'm not sure what the setup is there.  If you were using a servlet-2.3 capable container, then you could use a servlet filter to modify the content-type header before it is sent to the browser without modifying anything in XMLC.  The problem is, I think Enhydra 5 is still using Servlet-2.2, right?  Hopefully that will change soon.

Either way, you'll have to make it so that the XHTML gets served with a mime-type of text/html or application/xhtml+xml to make things work.


Jake

At 09:46 PM 12/21/2002 +0100, you wrote:
On So, 2002-12-21 at 08:18, Jacob Kjome wrote:
> Have you tested browser to find out which ones aren't compatible with the
> short tags (<br/>)?

no. I just read that the space should be there, that's all. There are
too many browsers today to test them all.

> There is nothing in the spec (that I know of) to say to leave the
> extra space.  I think it is just a recommendation.

it is a suggestion how to produce an XHTML that is readable by current
browsers.

> Glad to hear things are working for you otherwise.

They actually don't. I run into something very serious. My _javascript_
stopped working. I spent a day by debugging it until I found out that
Enhydra sends the stream as "text/xml" and in such case "document.forms"
is undefined - basically the whole DOM is not working for _javascript_.

I tried to modify the stream type to "text/xhtml" but then my Galeon
tried to save it as a binary data. The only way when it worked like it
should (including the _javascript_) was when I hacked it to type
"text/html".

So my question: is is possible to get the _javascript_ working in the
"text/xml" mode or is it better to tell XMLC to generate the pages as
"text/html"? Is there any switch for this?

Petr


_______________________________________________
XMLC mailing list
XMLC@xxxxxxxxxxx
http://www.enhydra.org/mailman/listinfo.cgi/xmlc
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise