Web Tools Platform 1.0 M5 - XML Catalog changes

As part of our ongoing efforts to support standards and establish APIs the XML Catalog has undergone some changes to comply more consistenly with the OASIS XML Catalog specification. These changes will affect XML Catalog serialization format and XML Catalog plugin extension point format. These changes will also affect the XML Catalog model APIs.

To make the transition to these new formats as painless as possible we will support both 'old' and 'new' formats for the 'M5' release. Post 'M5' we will discontinue support for the 'old' formats. These changes are described in more detail below.

1) Extension points


The catalog extension point was renamed from catalogContributor to catalogContributions. As before, plugins can contribute separate entries to the default workspace catalog through org.eclipse.wst.xml.core.catalog.catalogContributions extension point. However mappingInfo element should not be used, instead, extension point now supports system, public, uri according to the OASIS XML Catalog spec.

Example of the new extension point:

<extension point="org.eclipse.wst.xml.core.catalog.catalogContributions">
   <catalogContribution id="default">

        <uri
              name="http://www.w3.org/2001/XMLSchema" 
              uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd"/> 
       <public
              publicId="-//W3C//DTD XHTML 1.1//EN"
              uri="dtds/xhtml11-flat.dtd" /> 

   </catalogContribution> 
 </extension>

Please note that public and system elements should be used to catalog DTD's by Public ID and System ID correspondingly, and uri element to catalog XML Schemas and other resourses (e.g. stylesheets).

Example of deprecated extension:

Please note that due to consolidation of plugins org.eclipse.wst.xml.catalog and org.eclipse.wst.xml.uriresolver with org.eclipse.wst.xml.core catalogContributor exetension point moved to org.eclipse.wst.xml.core plugin.

 <extension point="org.eclipse.wst.xml.core.catalogContributor">
      <catalogContributor catalogId="default">
         <mappingInfo type="system" key="http://www.w3.org/2001/XMLSchema" uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd"/>
         <mappingInfo type="public" key="http://www.w3.org/1999/XSL/Transform" uri="data/xsd/XSLSchema.xsd"/>
       </catalogContributor>
 </extension>

For the details see org.eclipse.wst.xml.core.catalog.catalogContributions the extension point schema documentation

2) XML Catalog preferences are serialized in OASIS XML Catalog format


XML Catalog entires specified by the user in the peference page will now be serialzed using the OASIS format. This will be noticable when 'user catalog entries' are 'exported' from the preferences page or users who know to look in their .metadata directory to find the serialized XML Catalog prefences (in the org.eclipse.wst.xml.core plugin's state location).

3) Updated XML Catalog Provisional APIs


The XML Catalog model's provisional APIs have been updated to more closely refelect the OASIS Catalog spec. Provisional APIs for XML Catalog are in org.eclipse.wst.xml.core plugin, org.eclipse.wst.xml.core.internal.catalog.provisional package

Future Directions

In the future we hope to provide more support some of the 'richer' contructs defined in the OASIS XML Catalog via extension points and the UI. For example, support for the 'nextCatalog' entry will enable the reuse of existing OASIS catalogs via the XML Catalog preferencs page (bug 87465).