Document Type Definition and indentation rules

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
bwbohl
Posts: 17

Document Type Definition and indentation rules

Mon Nov 27, 2017 1:47 pm

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
=====
oXygen XML Editor v18.1
macOS Sierra 10.12.6
Radu
Posts: 5131

Re: Document Type Definition and indentation rules

Mon Nov 27, 2017 3:47 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 17

Re: Document Type Definition and indentation rules

Mon Nov 27, 2017 6:29 pm

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
=====
oXygen XML Editor v18.1
macOS Sierra 10.12.6
Radu
Posts: 5131

Re: Document Type Definition and indentation rules

Tue Nov 28, 2017 9:27 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 2 guests