Programmatically adding XML catalog?

This should cover W3C XML Schema, Relax NG and DTD related problems.
jruud
Posts: 4
Joined: Tue Mar 21, 2006 9:58 pm

Programmatically adding XML catalog?

Post by jruud » Thu Mar 23, 2006 6:44 am

Is there a way to programmatically add an XML catalog file to Oxygen from an Eclipse plugin? We would like our application (an Eclipse plugin) to automatically add our own catalog file to Oxygen if the Oxygen plugin is available (the existence check is the easy part). Ideally the change would not be persisted (the catalog file would only be added "in memory"), but a persistent change that may or may not require a restart of Eclipse would also be acceptable. However, in the latter case there must be a way to prevent the same catalog file from being added more than once. Is this currently possible, or are there any plans of supporting something similar in a future release?

Thanks, John

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache » Thu Mar 23, 2006 12:02 pm

Hello,

In the current version there is the possibility of modifying the default XML catalog of <oXygen/> presented below the checkbox "Use default catalog" available in Window -> Preferences -> oXygen / XML / XML Catalog. The default catalog is located in [Eclipse-install-folder]/plugins/com.oxygenxml.editor_7.1.0/frameworks/catalog.xml and can be modified by other plugin for example by adding a new entry nextCatalog. A future version of the plugin can define an extension point where other plugins can contribute XML catalogs that are added to the catalogs presented in Window -> Preferences -> oXygen / XML / XML Catalog and are used only in the current session of Eclipse, that is they are not saved in the user preferences for future sessions. I added this on our bugzilla but it does not have a top priority. To increase the priority we need more user demands or a business case.

Regards,
Sorin

jruud
Posts: 4
Joined: Tue Mar 21, 2006 9:58 pm

Post by jruud » Thu Mar 23, 2006 7:12 pm

Thanks Sorin, as you suggested manually manipulating the file should work. As for a future extension point I think I would need an API for programmatic access as well, as my plugin can't depend on Oxygen being present (while I'm not sure if fragments etc. may a possible workaround for this)

John

Post Reply