RFR: 8351969: Add Public Identifiers to the JDK built-in Catalog [v2]

Roger Riggs rriggs at openjdk.org
Tue Mar 18 18:53:11 UTC 2025


On Fri, 14 Mar 2025 18:35:22 GMT, Joe Wang <joehw at openjdk.org> wrote:

>> Add public identifiers to the JDK built-in Catalog; Replace the incorrect Schema 1.1 DTD files (note the Public Identifier at line 2) with the correct Shema 1.0 DTDs.
>
> Joe Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   update the test: change variables and etc.

The XMLSchema.dtd changes the referenced version from the 2009 version to the 2001 version. Is that intentional.

src/java.xml/share/classes/jdk/xml/internal/jdkcatalog/w3c/dtd/schema10/XMLSchema.dtd line 8:

> 6: <!-- prose copy in the structures REC is the definitive version -->    <!--d-->
> 7: <!-- (which shouldn't differ from this one except for this -->         <!--d-->
> 8: <!-- comment and entity expansions, but just in case) -->              <!--d-->

The other XML comments use the multi-line format with a single begin 
What is the meaning of ""?
Is "REC" a typo?
The comment seems unnecessarily apologetic. It should be sufficient to say:
Note: this DTD is NOT normative, any differences from RFC XXX are insidential". (or similar).

src/java.xml/share/classes/jdk/xml/internal/jdkcatalog/w3c/dtd/schema10/XMLSchema.dtd line 20:

> 18: <!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
> 19: 
> 20: <!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a

The original version is correct "overridden".

src/java.xml/share/classes/jdk/xml/internal/jdkcatalog/w3c/dtd/schema10/XMLSchema.dtd line 28:

> 26: <!-- Define all the element names, with optional prefix -->
> 27: <!ENTITY % schema "%p;schema">
> 28: <!ENTITY % defaultOpenContent "%p;defaultOpenContent">

There changes seem to be not related to the public identifier additions.

src/java.xml/share/classes/jdk/xml/internal/jdkcatalog/w3c/dtd/schema10/XMLSchema.dtd line 60:

> 58: <!-- Customisation entities for the ATTLIST of each element type.
> 59:      Define one of these if your schema takes advantage of the
> 60:      anyAttribute='##other' in the schema for schemas -->

Some changes seem to be present to minimize differences from the official versions.
Keeping the split line from the original would show fewer differences.

src/java.xml/share/classes/jdk/xml/internal/jdkcatalog/w3c/dtd/schema10/XMLSchema.dtd line 213:

> 211:      name and ref are mutually exclusive, one is required -->
> 212: <!-- In the absence of type AND ref, type defaults to type of
> 213:      substitutionGroup, if any, else the ur-type, i.e. unconstrained -->

ur-type does not appear in the original; is that intentional? 
(Ref https://www.w3.org/2009/XMLSchema/XMLSchema.dtd)

-------------

Changes requested by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24039#pullrequestreview-2695806614
PR Review Comment: https://git.openjdk.org/jdk/pull/24039#discussion_r2001727887
PR Review Comment: https://git.openjdk.org/jdk/pull/24039#discussion_r2001730500
PR Review Comment: https://git.openjdk.org/jdk/pull/24039#discussion_r2001732828
PR Review Comment: https://git.openjdk.org/jdk/pull/24039#discussion_r2001737834
PR Review Comment: https://git.openjdk.org/jdk/pull/24039#discussion_r2001744036


More information about the core-libs-dev mailing list