Ability to Enable/Disable Track Changes using PI

Are you missing a feature? Request it's implementation here.
bpopp
Posts: 37
Joined: Tue Nov 30, 2010 7:34 pm

Ability to Enable/Disable Track Changes using PI

Post by bpopp » Fri Jun 17, 2011 12:10 am

I have the need to be able to enable/disable the Track Changes feature by defining an Oxygen-specific processing instruction inside the document. This would provide customers with the ability to control this functionality remotely by making slight changes to the document before it opens in Oxygen. For example:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<?oxy_track_changes owner="wcoyote" enabled="yes" locked="yes"?>
<topic id="N10018">
<title>Introduction</title>
...
Thanks for considering..

Brian

bpopp
Posts: 37
Joined: Tue Nov 30, 2010 7:34 pm

Re: Ability to Enable/Disable Track Changes using PI

Post by bpopp » Fri Jun 17, 2011 12:51 am

Coincidentally I just noticed that this feature was partially added in 12.2. Once again, you guys are awesome:

Code: Select all

<?oxy_options track_changes="on"?>


I couldn't find any documentation on this feature, though. Are there any other options? It would be nice to be able to lock this functionality for a particular revision.

Radu
Posts: 7315
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ability to Enable/Disable Track Changes using PI

Post by Radu » Fri Jun 17, 2011 9:28 am

Hi Brian,

Yes, starting from Oxygen 12.2 the initial track changes state is saved as a processing instruction in the XML document. This is controlled by a combo box in the Editor / Pages / Author / Review preferences page:

http://www.oxygenxml.com/doc/ug-oxygen/ ... anges.html

What did you search for in the user manual?
Maybe we can update it to make the feature more searchable.

From what I understand you also want to lock the state for a certain XML document. This is not possible but you might have some workarounds.

Oxygen has support for plugins (Java based) and one plugin type can be used to hide buttons from the toolbar. For example you could hide the Track Changes button from the toolbar using a Startup plugin implementation:
http://www.oxygenxml.com/developer.html ... er_Plugins

Another think which you could do would be to use a custom processing instruction in the XML document and after the document is opened you could scan it, check for the processing instruction and enable track changes using the API. This would mean implementing a Workspace Access plugin type.

Of course everybody would need to have the plugin installed in their Oxygen installation.

So if you are interested in using such approaches by implementing Java plugins for Oxygen I can give you more details.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

bpopp
Posts: 37
Joined: Tue Nov 30, 2010 7:34 pm

Re: Ability to Enable/Disable Track Changes using PI

Post by bpopp » Fri Jun 17, 2011 7:30 pm

Radu wrote: What did you search for in the user manual?
Maybe we can update it to make the feature more searchable.
I searched on "oxy_options" and "track_changes" looking for more details on the specific processing instruction. I'd love to know of other, if any, oxy_options that are available to me from within the document. I could see additional attributes being very useful for things like hiding colspecs, explicitly specifying document type associations, specifying default display modes, and other Oxygen specific functionality.
Radu wrote: Oxygen has support for plugins (Java based) and one plugin type can be used to hide buttons from the toolbar. For example you could hide the Track Changes button from the toolbar using a Startup plugin implementation.
That's a possibility, but a clever user would quickly figure out how to turn off track changes, make a handful of changes, and then check the document back in. Granted, this feature likely wasn't intended as a control mechanism, but I know of at least a few people that are using it that way. A lock attribute would tie in nicely to the track_changes attribute you already have.

Radu
Posts: 7315
Joined: Fri Jul 09, 2004 5:18 pm

Re: Ability to Enable/Disable Track Changes using PI

Post by Radu » Mon Jun 20, 2011 12:52 pm

Hi Brian,
That's a possibility, but a clever user would quickly figure out how to turn off track changes, .......A lock attribute would tie in nicely to the track_changes attribute you already have.
As long as you rely on a processing instruction in the XML to lock track changes a clever user can switch to the Text page and remove the lock from there.

If you try to impose the state (and hide the toolbar button) using the Java API and all users are bound to install your custom plugin in Oxygen then they would have no means to disable change tracking.

Of course even in this case the user could still switch to the Text page and edit from there. The next Oxygen version will also have Java API to reject switching to a certain page.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

bpopp
Posts: 37
Joined: Tue Nov 30, 2010 7:34 pm

Re: Ability to Enable/Disable Track Changes using PI

Post by bpopp » Mon Jun 20, 2011 7:03 pm

Radu wrote:Hi Brian,
That's a possibility, but a clever user would quickly figure out how to turn off track changes, .......A lock attribute would tie in nicely to the track_changes attribute you already have.
As long as you rely on a processing instruction in the XML to lock track changes a clever user can switch to the Text page and remove the lock from there.
Those are good points. Thanks for the information.

Post Reply