Hi John,
Please see some remarks below:
An alternative approach is to place these checks within Subversion using Subversion's hook facility and that would be a departure from our practice (we're evaluating Oxygen, as you may have guessed) and add a level of complexity I'm hoping to avoid.
Indeed adding some SVN Hooks on the server side would be one way to do it.
I was hoping there might be something along the line of:
Suppose we would add some client side API callback looking like this:
Code: Select all
boolean preCommitCallback(URL[] filesToCommit, SVNHelper svnHelper)
On the callback you could return "true" if you want the commit to continue or "false" if you want to abort it, you could also show some error message dialogs if you want. The "SVNHelper" interface could be implemented on our side to return a certain URL's SVN revision number. Would you need any other details from the SVN client in addition to the SVN revision number?
Also in your code sample you seem to want to sometimes modify the XML content. The end user might have already closed the XML documents in Oxygen so you may need to modify the files directly by using the URL to identify the local File, read the file using a stream, modify the XML content and save it back, this would be difficult to do because each XML has a certain encoding which needs to be detected before the XML is opened. Or you could use our API to re-open the XML documents, make changes to them using our "WSEditor" API and save them back.
As an alternative we already have an "editorAboutToBeSavedVeto" API which would allow you to reject the save operation:
https://www.oxygenxml.com/InstData/Edit ... tener.html
when people are editing and attempt to save the XML content. Using this API you would need to do the checks more often but the XML file would already be opened so you could operate the changes directly inside it. We also have API to allow you to listen for all changes made in the XML document. In the eventuality you would use the "editorAboutToBeSavedVeto" API would you still want to know the SVN revision number on the edited XML document?
Also, I'm trying to use the formatting features such as boldface, Code, and Codebox, but when I "Preview" the effects of such formatting do not appears. "Disable BBCode" checked or unchecked does not alter the behavior. Also, I was trying to find the syntax for Codebox= in my attempt to create pseudo-code in the manner of JavaScript.
Right, our forum posting system is not that great and it has a number of small bugs, I'll ask our web developer to try to look into this. I usually use
to mark bold content and
[/code] to mark code blocks. Indeed the "Codebox" with a language-specific setting does not work for me either.
Regards,
Radu