Re: still too early for XHTML :-((
Petr Stehlik <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.xmlc |
|---|---|
| Message-ID | <[email protected]> |
On Út, 2003-04-08 at 16:30, Jacob Kjome wrote:
> When I say that it should be <script><script> and you say "but <script
> /> is XHTML compatible" we are arguing two different things.
I know what you mean (and meant).
> And that is the key "backward compatibility". If <script></script>
> and <script /> are both legal XHTML, but the latter is not backward
> compatible with browsers that only understand HTML, then we should be
> using <script></script>. We have everything to gain and nothing to
> lose. Where is the harm? This one's a no-brainer.
OK, but my point was whether to include a special hack for the SCRIPT
tag or if to use the David C.'s patch that enable </tag> everywhere. The
former is definitely a hack while the latter is more clear but turns off
one advantage of XHTML over HTML - a shorter code (shorter of the
closing tags).
Anyway, I have decided to continue with XHTML (after I realized that
Enhydra still strips the ID off the SPAN tags in HTML mode), applied
David's patch and am happy. The <script></script> works perfectly!
> > 1) document type incorrect, javascript didn't work
> > 2) too old DTD for XHTML in XMLC
>
> Is this an XMLC issue or an Enhydra framework issue? How do you set
> the doctype?
this wasn't about doctype. Enhydra didn't allow me to include "ID" to
<TITLE>. Latest XHTML 1.0 allows that. I submitted a patch for the DTD.
It's in the Enhydra 5.1.
> oo.setOmitDocType(false);
> oo.setPublicId("-//W3C//DTD HTML 4.01 Transitional//EN");
> oo.setSystemId("http://www.w3.org/TR/html401/loose.dtd");
I don't do anything like that.
I did two things: first, all my HTML files do contain the XHTML header
(so that validator.w3.org can validate them) and second, I added the
following line to my options.xmlc:
-domfactory org.enhydra.xml.xhtml.HTMLDomFactory
Thanks to that the doctype is "text/html" (so browsers can handle that).
> > 3) setting of boolean attributes does not work
>
> Yep, definitely need this patched! Did you provide this patch
no, I haven't patched this. I added a workaround to my application code
for now (using setAttribute(attr, attr)). Would be happy if somebody
fixed it.
> Maybe provide a .zip file with all gathered patches included?
google can find all the patches I posted. Also David's patch was at the
top of google's list.
> > 4) single quotes are converted to ' (IE doesn't understand)
>
> Like I said in my email last night, the fix for this is to use '
any idea what to patch in XMLC? Right now I use David's patch to keep
the single quotes untranslated...
> > 6) URLRewriter does not work
>
> What was the issue with this one? I don't remember.
URLRewriter is not called since the XHTML page is instanceof XMLObject.
I posted a longish thread (replying to myself most of the time) about
all that one or two weeks ago.
Petr