Search code examples
xmleclipsexsdxmlcatalog

How does Eclipse generate the Plugin Specified Entries in the XML catalog?


I would like my Eclipse plug-in to specify a XSD file to Eclipse so it can be added to the catalog.


Solution

  • The org.eclipse.wst.xml.core.catalogContributions extension point lets you add to the catalog (this requires that you have the Web Tools (WST) component of Eclipse installed).

    For example the org.eclipse.wst.xsd.core plugin adds this:

    <extension
        point="org.eclipse.wst.xml.core.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" />
            <system
                 systemId="http://www.w3.org/2001/xml.xsd"
                 uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd"/>             
       </catalogContribution>
    </extension>