The xsl:strip-space element is used to remove white-space only nodes so that they do not appear in the output. By white-space, we refer to carriage returns, line feeds, spaces and tabs. No text or numbers appear in the node.
The related xsl:preserve-space element is used to keep white-space only nodes in the output. Note that the default is to leave white-space only nodes. Therefore, it is only necessary to use the xsl:preserve-space element when you use the xsl:strip-space element and wish to insure that certain white-space nodes are not removed.
This is a self-closing element and it cannot contain any child elements or any content.
The mandatory elements attribute is a white-space delimited list of the names of the elements in which all of the white-space nodes can be removed. You can also use generic names with wild cards. For example, elements=”*” removes all white-space nodes in all elements.
Scroll to Top