ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | xmlc List | May 2007 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [xmlc] org.enhydra.xml.xhtml.dom interfaces


Exactly what I wanted to know...and pretty much what I expected. Thanks for that.

Erik

On May 8, 2007, at 5:59 PM, Jacob Kjome wrote:

Hi Erik,

The HTML interfaces are what they are. They were generated a long time ago by the W3C and/or the Xerces project and haven't changed much over the years. I'm not sure if they used a DTD to generate them or not? I would guess not since the HTML 4.01 DTD is totally invalid, making it so a standard DTD parser would
fail upon attempting to validate against it.

The XHTML interfaces that ship with XMLC were generated from the XHTML 1.0 DTD (probably transitional). While it is possible to use the HTML interfaces, there are going to be places where the XHTML DTD has more get/set methods than
the HTML interfaces.  You can work around this by using, for instance,
setAttribute("for", value) instead of setFor(value). You will find the same
issue in both the 2.2.xx codebase as the 2.3 codebase.

In any case, it is entirely up to you whether you use the HTML interfaces -vs- the XHTML ones. The main reason why I made the change was to allow the XHTML DOM to be used within apps/frameworks that only refer to the HTML interfaces, such as in Barracuda applications. If you are using the XHTML DOM anyway, there's no particular reason to not refer to the XHTML interfaces in your own app. I just wanted to allow for compatibility in frameworks that don't make
the distinction and only deal with the HTML DOM.


Jake

Quoting Erik Rasmussen <rasmussenerik@xxxxxxxxx>:

Jake,

As I mentioned before, for no good reason, when I started using XMLC
a couple years ago, I began using the XHTMLElement interfaces
provided in the XMLC jars.  Recently, I've been trying to use the
org.w3c.dom.html.HTMLElement interfaces like you suggested.  It makes
sense to use the most generic interface available, and I'd rather
have my code locked in to a W3C API than an Enhydra one (no offense!).

But I've been noticing that some setter methods just aren't there in
the HTMLElement versions of all the tag types.  For instance,
HTMLLabelElement.setFor() doesn't exist, but XHTMLLabelElement.setFor
() does.

And all the setOnClick(), setMouseDown(), etc. methods are on
XHTMLInputElement, but not on HTMLInputElement.  What's up with
that?  Are they not standard HTML?  Is the W3C API just behind the
times?

Which should I really be using?  Is it worth doing a s/XHTML/HTML/g
on my entire code base?  Does the latest 2.3_RC1 "XMLC no longer
wraps Xerces into its own namespace" have anything to do with this?
(I haven't upgraded yet)

Just curious...

Cheers,
Erik







--
You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list.
To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws




<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.