Question

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

Was it helpful?

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>

OTHER TIPS

It reads them from an extension point. org.eclipse.wst.standard.schemas and org.eclipse.jst.standard.schemas (both from the Web Tools Platform and installed with the Java EE IDE) contain many examples. Since there's no compiled code in those plug-ins, you can just study the installed copies.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top