Summary
Enhance the JDK built-in Catalog with additional DTDs and XSDs from the W3C specifications.
Problem
The JDK built-in Catalog was introduced in JDK 22, providing a mechanism to resolve references to external resources, such as DTDs and XSDs, natively without making external network connections. The coverage on externally referenced DTDs and XSDs however, was limited as it initially hosted with only DTDs defined by the Java Platform. For the purpose of reducing external network activities made by the XML processors, expanding the built-in catalog by adding DTDs and XSDs from the W3C specifications would significantly increase the coverage on commonly used DTDs and XSDs.
A higher coverage on standard DTDs and XSDs will also prepare the JDK to meet the needs for referencing these external resources in XML documents, thus reducing potential interruptions to user applications when a stricter restriction is applied to external access.
Solution
Add DTDs and XSDs from W3C specifications to the built-in catalog, including:
XHTML™ 1.0 The Extensible HyperText Markup Language
XHTML™ 1.1 - Module-based XHTML
XML DTD for W3C specifications
Specification
Files to be added to the built-in catalog in the java.xml module under jdk/xml/internal/jdkcatalog/w3c.
The following files are included in the attachment W3C_DTDXSD.zip.
XHTML 1.0
xhtml1-frameset.dtd xhtml1-strict.dtd xhtml1-transitional.dtd
xhtml-lat1.ent xhtml-special.ent xhtml-symbol.ent
xhtml1-frameset.xsd xhtml1-strict.xsd xhtml1-transitional.xsd
XHTML 1.1
xhtml11.dtd
xhtml-attribs-1.mod xhtml-blkstruct-1.mod xhtml-events-1.mod
xhtml-inlphras-1.mod xhtml-link-1.mod xhtml-pres-1.mod xhtml-struct-1.mod
xhtml-base-1.mod xhtml-charent-1.mod xhtml-form-1.mod xhtml-inlpres-1.mod xhtml-list-1.mod xhtml-qname-1.mod xhtml-style-1.mod
xhtml-bdo-1.mod xhtml-csismap-1.mod xhtml-framework-1.mod xhtml-inlstruct-1.mod xhtml-meta-1.mod xhtml-ruby-1.mod xhtml-table-1.mod
xhtml-blkphras-1.mod xhtml-datatypes-1.mod xhtml-hypertext-1.mod xhtml-inlstyle-1.mod xhtml-object-1.mod xhtml-script-1.mod xhtml-text-1.mod
xhtml-blkpres-1.mod xhtml-edit-1.mod xhtml-image-1.mod xhtml-legacy-1.mod xhtml-param-1.mod xhtml-ssismap-1.mod xhtml11-model-1.mod
xhtml-attribs-1.xsd xhtml-copyright-1.xsd xhtml-datatypes-1.xsd xhtml-framework-1.xsd xhtml11-model-1.xsd xhtml11-modules-1.xsd xhtml11.xsd
https://www.w3.org/XML/1998/namespace
xml.xsd (referenced by xhtml11.xsd, XMLSchema.xsd)
XML Schema 1.0
XMLSchema.dtd XMLSchema.xsd datatypes.dtd datatypes.xsd
XML DTD for W3C specifications
xmlspec.dtd
Changes to the module summary (added the files to the table):
Note: module-summary.html before and after the change are attached as jdk8344800_javadoc.zip
* <h2 id="JDKCATALOG">JDK built-in Catalog</h2> - * The JDK has a built-in catalog that hosts the following DTDs defined by the Java Platform: - * <ul> - * <li>DTD for {@link java.util.prefs.Preferences java.util.prefs.Preferences}, preferences.dtd</li> - * <li>DTD for {@link java.util.Properties java.util.Properties}, properties.dtd</li> - * </ul> + * The JDK has a built-in catalog that hosts DTDs and XSDs list in the following table. + * <table class="plain" id="JDKCatalog"> + * <caption>DTDs and XSDs in JDK built-in Catalog</caption> + * <thead> + * <tr> + * <th scope="col">Source</th> + * <th scope="col">Files</th> + * </tr> + * </thead> + * + * <tbody> + * <tr> + * <th scope="row" style="font-weight:normal" id="util_preferences"> + * {@link java.util.prefs.Preferences java.util.prefs.Preferences}</th> + * <td style="text-align:center"> + * preferences.dtd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="util_properties"> + * {@link java.util.Properties java.util.Properties}</th> + * <td style="text-align:center"> + * properties.dtd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="XMLSchema"> + * XML Schema Part 1: Structures Second Edition<br> + * XML Schema Part 2: Datatypes Second Edition + * </th> + * <td style="text-align:center"> + * XMLSchema.dtd XMLSchema.xsd datatypes.dtd datatypes.xsd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="XHTML10"> + * XHTML™ 1.0 The Extensible HyperText Markup Language + * </th> + * <td style="text-align:center"> + * xhtml1-frameset.dtd xhtml1-strict.dtd xhtml1-transitional.dtd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="XHTML10Schema"> + * XHTML™ 1.0 in XML Schema + * </th> + * <td style="text-align:center"> + * xhtml1-frameset.xsd xhtml1-strict.xsd xhtml1-transitional.xsd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="XHTML11"> + * XHTML™ 1.1 - Module-based XHTML - Second Edition + * </th> + * <td style="text-align:center"> + * xhtml11.dtd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="XHTML11Schema"> + * XHTML 1.1 XML Schema Definition + * </th> + * <td style="text-align:center"> + * xhtml-attribs-1.xsd xhtml-copyright-1.xsd xhtml-datatypes-1.xsd xhtml-framework-1.xsd<br> + * xhtml11-model-1.xsd xhtml11-modules-1.xsd xhtml11.xsd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="XMLSPEC"> + * XML DTD for W3C specifications + * </th> + * <td style="text-align:center"> + * xmlspec.dtd + * </td> + * </tr> + * <tr> + * <th scope="row" style="font-weight:normal" id="Namespace"> + * The "xml:" Namespace + * </th> + * <td style="text-align:center"> + * xml.xsd + * </td> + * </tr> + * </tbody> + * </table> * <p> * The catalog is loaded once when the first JAXP processor factory is created. *
- csr of
-
JDK-8344800 Add W3C DTDs and XSDs to the JDK built-in Catalog
- Resolved