Page 1 of 1

Automatic schema sync for open files upon schema change

Posted: Wed Nov 21, 2007 10:48 am
by Atzmon
Our application uses XML files from which we generate XSD files during save (we have an eclipse builder plugin). The generated XSDs are defined as the schema of our XML files (each eclipse project has an XSD that imports XSDs from projects on which it depends).
The schemas change frequently (every few seconds) and are very large (e.g. 120,000 lines of XML in one project).

Our developers are used to clicking the "reset caches and validate" button after each save (actually they are used to click this button twice because many times once is not enough).

It would increase our productivity significantly if this will be done automatically whenever a schema changed (e.g. upon save, check if the schema changed and reload it if needed).

Posted: Thu Nov 22, 2007 12:06 pm
by Radu
Dear Atzmon,

The normal validation detects if the schema used directly by the XML file was modified by looking at the timestamp and automatically resets the schemas cache.

The problem seems to be that the XSD schema directly used by the XML file remains unmodified and that's why the editors need to press "Reset cache and validate" in order to reset the schemas cache.

I suppose you already have the "Check errors on save" option available in the "Options->Preferences->Editor->Open/Save" page.

As a workaround when you modify any of the indirectly imported schemas you also have to touch (update the timestamp) on the main schema imported directly by the XML file.

If this is not possible for you we will consider adding an Oxygen option to "reset cache" on save.

Regards,
Radu

Posted: Thu Nov 22, 2007 3:12 pm
by Atzmon
Hi Radu,
Thanks for the prompt reply. We will try the touch as you proposed.

Regards,
Atzmon