Page 1 of 1

Can attribute values be assigned "Default Space"

Posted: Thu Dec 19, 2019 12:12 am
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.

Re: Can attribute values be assigned "Default Space"

Posted: Wed Jan 15, 2020 6:06 pm
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