ValidationScenario fails when opening XML from Workspace Plu
Posted: Wed Jul 02, 2014 9:37 pm
Hello,
I'm writing a workspace plugin to automatically traverse and validate all referenced XML documents from a single "root" document. I have a custom validation scenario setup that automatically runs when an applicable XML file is opened normally, but when I open the file through the PluginWorkspace, like this:
The validation scenario does not trigger correctly. It does work if I select the Editor window and hit F5 to refresh, so I even tried adding the following:
But it still does not help. Am I missing something in the documentation? I've searched the forums, but everyone seems to be using this method.
The unique aspect of my Validation Scenario is simply that I'm redirecting to a controlled copy of a schema (as opposed to the relative path that is used in the XML by default), and there is schematron validation performed. It seemed excessive to recreate these steps in the plugin when I could simply open an Editor window and check the ValidationProblems.
Thanks,
Dale
I'm writing a workspace plugin to automatically traverse and validate all referenced XML documents from a single "root" document. I have a custom validation scenario setup that automatically runs when an applicable XML file is opened normally, but when I open the file through the PluginWorkspace, like this:
Code: Select all
PluginWorkspace ws = PluginWorkspaceProvider.getPluginWorkspace();
ws.open(url, EditorPageConstants.PAGE_AUTHOR);
Code: Select all
WSEditor ed = ws.getEditorAccess(url, PluginWorkspace.MAIN_EDITING_AREA);
WSAuthorEditorPage page = (WSAuthorEditorPage) ed.getCurrentPage();
page.refresh();
The unique aspect of my Validation Scenario is simply that I'm redirecting to a controlled copy of a schema (as opposed to the relative path that is used in the XML by default), and there is schematron validation performed. It seemed excessive to recreate these steps in the plugin when I could simply open an Editor window and check the ValidationProblems.
Thanks,
Dale