[oXygen-user] whitespace normalization

George Cristian Bina george at oxygenxml.com
Sun Feb 19 02:19:56 CST 2012


Hi Syd,

The format and indent action on text will never completely remove 
whitespace. It also does not insert new whitespace. All it does is that 
it changes existing whitespace by adding/removing new lines and spaces.

The CSS provides some additional information to the format and indent 
action, only when you edit in Author mode.
For example, if the CSS has a rule that renders an element with 
whitespace preserved then oXygen will not format that element.
Also, if all the elements inside a parent element are defined as blocks 
and there is no text inside that parent element (except whitespace) then 
oXygen will consider that parent as containing element only content and 
will indent those elements (there is also an option that controls this 
last behavior, it is called "Indent blocks-only content").

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 2/19/12 12:11 AM, Syd Bauman wrote:
> Apologies if this is a FAQ -- I'm in mid-workshop.
>
> I *think* oXygen already does what I want, but I can't seem to figure
> out how to get it to. I want whitespace to be normalized in<l>,<p>,
> and<head>  elements when I choose format-and-indent.
>
> In the Preferences "Editor / Format / XML" pane, in the "Element
> Spacing" section, I've added
>    //l
>    //p
>    //head
> to the "Default space" tab, and made sure they are not listed in the
> "Preserve space" tab. But either with or without an<?xml-stylesheet?>
> PI to a CSS file, and whether or not "Schema aware format and indent"
> is checked, oXygen never strips off my leading or trailing whitespace.
>
> Any thoughts?
>
> Oh ... it just occured to me: I've scanned the help pages, and the
> decision about whether to normalize space or not seems to be based
> more on CSS than on those preferences; could the default oXygen CSS
> stylesheet (for TEI, of course :-) by messing me up, here?
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


More information about the oXygen-user mailing list