Document Type Definition and indentation rules

Having trouble installing Oxygen? Got a bug to report? Post it all here.
bwbohl
Posts: 37
Joined: Mon Jan 23, 2017 11:20 am

Document Type Definition and indentation rules

Post 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
=====
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Document Type Definition and indentation rules

Post 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-j ... le-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/ ... ities.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 37
Joined: Mon Jan 23, 2017 11:20 am

Re: Document Type Definition and indentation rules

Post 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
=====
oXygen XML Editor v24.1
macOS Monterey 12.3.1 Apple Silicon
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Document Type Definition and indentation rules

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