JDK-8042244 : Re-examine the supportedness of non-SE org.w3c.dom.** API
  • Type: Enhancement
  • Component: xml
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-04-30
  • Updated: 2019-07-25
  • Resolved: 2015-04-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b61Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8054197 :  
JDK-8064291 :  
JDK-8175785 :  
Description
JDK 8 includes 11 org.w3c.dom.** packages:
  org.w3c.dom
  org.w3c.dom.bootstrap
  org.w3c.dom.css
  org.w3c.dom.events
  org.w3c.dom.html
  org.w3c.dom.ls
  org.w3c.dom.ranges
  org.w3c.dom.stylesheets
  org.w3c.dom.traversal
  org.w3c.dom.views
  org.w3c.dom.xpath

Only five of them are endorsed in Java SE 8:
  org.w3c.dom
  org.w3c.dom.bootstrap
  org.w3c.dom.events
  org.w3c.dom.ls
  org.w3c.dom.views

This issue is to re-examine the supportedness of the six non-endorsed packages. After all, most of the non-endorsed packages are included in the Java Plug-in's "Common DOM API" [1] which is referenced from the Java Tutorial [2] and the JDK Deployment Guide [3] :
   org.w3c.dom.css
   org.w3c.dom.html
   org.w3c.dom.ranges
   org.w3c.dom.stylesheets
   org.w3c.dom.traversal

(org.w3c.dom.xpath is the sole non-endorsed package not included in the Common DOM API.)

[1] http://docs.oracle.com/javase/8/docs/jre/api/plugin/dom/ 
[2] http://docs.oracle.com/javase/8/docs/technotes/guides/jweb/decision_guide.html
[3] http://docs.oracle.com/javase/tutorial/deployment/applet/manipulatingDOMFromApplet.html 

Until this issue is resolved, the java.xml module in JDK 9 will include all 11 packages but export only the five endorsed packages. The above docs should also be updated per the resolution of this bug.
Comments
org.w3c.dom.ranges and org.w3c.dom.traversal are listed in the JAXP specification (JSR 206) [1]. The javadoc for these packages are missing in the Java SE 8 API documentation. They are endorsed in Java SE and so are exported packages in java.xml module in JDK 9. org.w3c.dom.{css, html, stylesheets, xpath} are promoted to JDK supported APIs in JDK 9. JDK 9 defines `jdk.xml.dom` module which exports the following packages: exports org.w3c.dom.css; exports org.w3c.dom.html; exports org.w3c.dom.stylesheets; exports org.w3c.dom.xpath; [1] http://docs.oracle.com/javase/6/docs/technotes/guides/xml/jaxp/index.html
24-03-2017

org.w3c.dom.{css,html,stylesheets,xpath} are missing in jdk9 b61 due to this fix. JDK-8078139 resolved the regression and will be integrated in the next build.
28-04-2015

The agreement from the Jigsaw team discussion is to: 1. define a new jdk.xml.dom module exports org.w3c.dom.css, org.w3c.dom.html, org.w3c.dom.stylesheets, org.w3c.dom.xpath; Existing code can continue to use them. Or choose to link in with and with these W3C interfaces (~380K uncompressed total on linux). Compact2 size will be reduced as they are not part of compact2 and can now be separated. 2. java.xml will need a copy of repackaged org.w3c.dom.xpath for javax.xml.xpath implementation use.
01-04-2015

JavaFX WebKit (com.sun.webkit.dom.* classes) depends on several of these unsupported org.w3c.dom APIs. $ jdeps -v -regex org.w3c.dom.* /java/re/jdk/9/latest/binaries/windows-amd64/jre/lib/ext/jfxrt.jar org.w3c.dom.css, .stylesheets, etc are not flagged as JDK internal APIs because they are included in NON_CORE_PKGS.gmk that was assumed as "exported" when generating ct.sym. If they are supported, they should be exported in modules.
30-04-2014