Not indent elements with 'linefeed-treatment="preserve"'?

Is there a way that a framework can make oXygen not reindent elements that have 'linefeed-treatment="preserve"'? http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/preferences-edi... says that elements can be added to the 'Preserve space' list, but "*[@linefeed-treatment='preserve']" isn't a 'simple node test' and seems to be being silently ignored. Even if it did work, it can't be set by the 'focheck' framework. (Separately, the ability to edit an item in the list, rather than having to make a new item based on an existing item then deleting the old item, seems to me to be useful.) http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/format-and-inde... says that it can be done with CSS using 'white-space: pre', but *[linefeed-treatment=preserve] { white-space: pre; } is having no effect on Text mode 'Format and Indent Element' results. (Separately again, is there a key combination to insert a line break that doesn't also insert indenting white-space?) Regards, Tony Graham. -- Senior Architect XML Division Antenna House, Inc. ---- Skerries, Ireland tgraham@antenna.co.jp

Hi Tony, I cannot think of a way to enforce the whitespace preserve on an element based on an some attribute value. For inserting a new line without indenting, just define a code template (Options -> Preferences -- Code Templates) with the content " ${caret}" (without the quotes, I added them just to show the new line before the caret variable) and assign a shortcut to that, for example I set CMD+Shift+Enter on my Mac. After that, using the shortcut I can insert a new line without any indent. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 27/08/15 14:30, Tony Graham wrote:
Is there a way that a framework can make oXygen not reindent elements that have 'linefeed-treatment="preserve"'?
http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/preferences-edi...
says that elements can be added to the 'Preserve space' list, but "*[@linefeed-treatment='preserve']" isn't a 'simple node test' and seems to be being silently ignored.
Even if it did work, it can't be set by the 'focheck' framework.
(Separately, the ability to edit an item in the list, rather than having to make a new item based on an existing item then deleting the old item, seems to me to be useful.)
http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/format-and-inde...
says that it can be done with CSS using 'white-space: pre', but
*[linefeed-treatment=preserve] { white-space: pre; }
is having no effect on Text mode 'Format and Indent Element' results.
(Separately again, is there a key combination to insert a line break that doesn't also insert indenting white-space?)
Regards,
Tony Graham.

Hello Tony, In Oxygen version 17.1 you can use one attribute condition inside the 'Preserve space' entries. So an entry like: *[@linefeed-treatment='preserve'] should now work. The XPath expressions can accept one of these type of attribute conditions (default attribute values are not taken into account): * /element[@attr]/ - Matches all instances of the specified element that include the specified attribute. * /element[not(@attr)]/ - Matches all instances of the specified element that do not include the specified attribute. * /element[@attr = "value"]/ - Matches all instances of the specified element that include the specified attribute with the given value. * /element[@attr != "value"]/ - Matches all instances of the specified element that include the specified attribute and its value is different than the one given. All the above restrictions and limitations are because we want these expressions to run as fast as possible. Best regards, Alex -- Alex Jitianu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 8/27/2015 2:30 PM, Tony Graham wrote:
Is there a way that a framework can make oXygen not reindent elements that have 'linefeed-treatment="preserve"'?
http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/preferences-edi...
says that elements can be added to the 'Preserve space' list, but "*[@linefeed-treatment='preserve']" isn't a 'simple node test' and seems to be being silently ignored.
Even if it did work, it can't be set by the 'focheck' framework.
(Separately, the ability to edit an item in the list, rather than having to make a new item based on an existing item then deleting the old item, seems to me to be useful.)
http://www.oxygenxml.com/doc/versions/17.0/ug-editor/#topics/format-and-inde...
says that it can be done with CSS using 'white-space: pre', but
*[linefeed-treatment=preserve] { white-space: pre; }
is having no effect on Text mode 'Format and Indent Element' results.
(Separately again, is there a key combination to insert a line break that doesn't also insert indenting white-space?)
Regards,
Tony Graham.
participants (3)
-
Alex Jitianu
-
George Bina
-
Tony Graham