Can attribute values be assigned "Default Space"

Oxygen general issues.
lilac95
Posts: 1
Joined: Wed Dec 18, 2019 11:18 pm

Can attribute values be assigned "Default Space"

Post by lilac95 »

In Editor > Format > XML or elsewhere, is it possible to "normalize" attribute values (eliminate consecutive white-space characters). I'm using the Break Long Attributes setting but when new content is added and a "Format and Indent" is performed extra spaces are generated in attribute values. I've tried adding attributes manually via XPath to the "Default Space" list to no avail.

Example
Before:

Code: Select all

		<p>Lorem ipsum dolor sit amet, consectetur <example list="Lorem, ipsum, 
		dolor, sit, amet, consectetur"/>
After content change and format and indent:

Code: Select all

		<p>Lorem ipsum dolor sit. Lorem ipsum dolor sit amet, consectetur 
		<example list="Lorem, ipsum, 		dolor, sit, amet, consectetur"/>
From here https://www.oxygenxml.com/doc/versions/ ... odes2.html I see
Attribute values are always in the preserve space category
This seems to create a difficult situation with the Break Long Attributes option and indenting.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Can attribute values be assigned "Default Space"

Post by adrian »

Hello,

Break Long Attributes does indeed break the rule of "Attribute values are always in the preserve space category" and inserts line breaks and indents. I'm afraid that there is no option to do the reverse (normalize white-spaces in the attribute values).
I've logged a feature request. For future reference it is issue EXM-44878.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply