Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Automation Scripting User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

strip-space

date_range 13-Jan-21

Syntax

content_copy zoom_out_map
strip-space element-list;

Description

Remove whitespace-only child text nodes from the source tree element nodes listed, but not from the child text nodes of the element node children. To perform whitespace stripping on the child text nodes of the element node children, specify the child nodes as separate entries in the strip-space element list. Specifying an asterisk removes whitespace-only child elements from all elements. A text node is considered whitespace-only if it includes only spaces, tabs, newlines, and carriage returns.

This statement must be defined as a top-level statement in the script. The default is to preserve all whitespace-only elements.

Attributes

element-list

List of element names separated by spaces.

SLAX Example

The following example removes all whitespace-only text nodes from the source tree except for child elements of <user-context>:

content_copy zoom_out_map
version 1.1;

preserve-space user-context;
strip-space *;

match / {
...
}

Release Information

Statement introduced in version 1.0 of the SLAX language.

footer-navigation