|
Re: w3c html dom versioning oddities: msg#00019java.enhydra.xmlc
Hi Jake, The problem is that the HTML DOM Level 2 early Working drafts changed the API of some HTMLElements, but not the package names (see http://www.w3.org/TR/2000/WD-DOM-Level-2-HTML-20001113/java-binding.html). Before the final recommendation the package names where changed to org.w3c.dom.html2, thus ending the confusion about incompatibility. The source of the problem is that people were using the interfaces from those early Level 2 interfaces and getting into compatibility issues. This poped up again on the Xerces-J developer list when Neeraj discovered incompatibilities with JDK1.4, because JDK1.4 ships with such an early Level 2 api (having the old package name, but some new methods). See thread 'Xerces DOM HTML impl' on the developer list. Since, the HTML DOM implementation provided by Xerces is really DOM Level 1, they are shipping the 'real' DOM Level 1 API with Xerces. However, this may result in some tricky classpath issues if you are using JDK1.4, since the Xerces classes don't provide the additional methods found in JDK1.4 (HTML DOM Level 2) but not present in the original HTML DOM Level 1 API. I also think the only clean solution is to use HTML DOM Level 1 API or provide a DOM Level 2 Implementation, but then use the final recommendation with the new package names. Then you won't have any incompatibilities any more. (But AFAIK, there is no Level 2 implementation out there :-( ). Also another point to mention is that HTML DOM Level 2 is based on DOM Level 2 Core, while Level 1 is based on, you guessed it, Core DOM Level 1. So if you are using Xerces 2, you will use DOM Core Level 2 + HTML DOM Level 1. This seems to works ok. I just found some performance drawbacks, for example, HTMLDOcument implements the 'getElementById' method in a very slow fashion (searching the tree every time). This method is provided in class Document since Level 2 (and implemented by Xerces as Hashtable lookup). hope that helps, Arno Jacob Kjome wrote:
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: xmlc's xerces and existing endorsed packages proposal...., Jacob Kjome |
|---|---|
| Next by Date: | Re: w3c html dom versioning oddities, Jacob Kjome |
| Previous by Thread: | XMLC and JUnit..., Jacob Kjome |
| Next by Thread: | Re: w3c html dom versioning oddities, Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |