Page 1 of 1

Document Type Definition and indentation rules

Posted: Mon Nov 27, 2017 1:47 pm
by bwbohl
Hi Team,

I know I can configure indentation and formatting for specific elements, e.g. specify that a element should be considered block level with line-breaks before and after the element in Editor/Format/XML/Element Spacing, e.g. by adding the element name or an XPath to the "Line break" tab.

Is there a way to tie theses rules to elements from a specific namespace, only?
Or to supply those rules packed with a framework or add-on?

Many thanks,
Benjamin

Re: Document Type Definition and indentation rules

Posted: Mon Nov 27, 2017 3:47 pm
by Radu
Hi Benjamin,

You cannot save these preferences at framework configuration level. We have an internal issue for this and I added on the issue a link to this forum thread. So if at some point we implement this we'll update this forum thread.
But you can impose settings from an Oxygen plugin.
On this Github repository:

https://github.com/oxygenxml/wsaccess-javascript-sample-plugins

I added a sample plugin called "impose-options" which takes an XML document containing a couple of saved Oxygen options (using the main menu Options->"Export Global Options") and uses it to impose the options in Oxygen when it starts.
And an Oxygen plugin can also be packed as an add-on.
Basically your end users would refer in Oxygen's UI to an add-on location and there they would find both a plugin and a framework, they would need to check and install both of them in order for everything to work as planned.

More about sharing common settings:

https://www.oxygenxml.com/doc/versions/19.1/ug-editor/topics/sharing-possibilities.html

Regards,
Radu

Re: Document Type Definition and indentation rules

Posted: Mon Nov 27, 2017 6:29 pm
by bwbohl
Hi Radu,

many thanks so far!

So if get this right I could add a "Default prefix-namespace mapping" in "Preferences/XML/XSLT-FO-XQuery/XPath" and use the described method to impose those for my defined namespace.

Great!

Many thanks,
Benjamin

Re: Document Type Definition and indentation rules

Posted: Tue Nov 28, 2017 9:27 am
by Radu
Hi Benjamin,

So whatever changes you can manually make to the global settings can be exported as an XML file and then a plugin can impose options using that XML file.

Regards,
Radu