Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023732

JEP 268: XML Catalogs



    • Joe Wang
    • Feature
    • Open
    • SE
    • core dash libs dash dev at openjdk dot java dot net
    • S
    • M
    • 268



      Develop a standard XML Catalog API that supports the OASIS XML Catalogs standard, v1.1. The API will define catalog and catalog-resolver abstractions which can be used with the JAXP processors that accept resolvers.


      It is not intended that the new API replicate the existing internal catalog implementation. In other words, there is no intent to provide compatible APIs or maintain source or binary compatibility. Existing libraries or applications that use the internal API will need to migrate to the new API in order to take advantage of the new features.


      XML Catalogs are useful when resolving external references in XML/XSD/XSL, removing the need to repetitively retrieve external resources. In some cases, an XML Catalog is required to ensure that applications work properly in local environments where the source of the imported XML resource is different from the original.

      XML Catalogs can also improve application security by directing remote external references to a local Catalog and then forbidding the retrieval of external resources.

      An internal catalog resolver has been included in the JDK since JDK 6. Due to the lack of a public API, it has been used or referenced directly by external libraries/applications. It was also bundled and delivered in a Maven repository and used by applications such as JAX-WS/JAXB (see, e.g., com.sun.xml.ws.util.xml.XmlUtil). A standard API is desirable so that the feature can actually be supported.


      The XML Catalog API will define the following interfaces in accordance with the OASIS XML Catalogs standard, v1.1. It will provide straightforward support for the core features of the Catalog standard, implementing the EntityResolver and URIResolver interfaces:

      • The CatalogManager will manage the creation of XML Catalogs and CatalogResolvers, as well as features and properties.

      • A Catalog will implement the semantics of OASIS Open Catalog files. It will define an entity catalog that maps external identifiers and URI references to (other) URI references, and delegates to other catalogs.

      • A CatalogResolver will implement JAXP's existing EntityResolver and URIResolver interfaces. The resolver will supports the OASIS standard processing instruction as a SAX XMLFilter.

      This JEP also proposes to remove the internal catalog resolver implementation after the public API is delivered.

      The new API will conform to the current specification version 1.1, which is compatible with OASIS Technical Resolution 9401:1997 (Amendment 2 to TR 9401), which is what the internal catalog resolver was based on.


        Issue Links



              joehw Joe Wang
              joehw Joe Wang
              Joe Wang Joe Wang
              Brian Goetz, Mandy Chung
              Brian Goetz
              0 Vote for this issue
              10 Start watching this issue