HTML Whitespace

Use the global whitespace settings on the Whitespace page to define how WorldServer should deal with any extra whitespace characters it finds in the elements of an HTML document.

The global whitespace settings control the whitespace configurations for:

  • HTML elements which are not subject to a parser rule
  • content extracted as non-translatable from any HTML element
  • whitespace found in the attributes of any element

WorldServer considers spaces, non-breaking spaces, tabs and line breaks as whitespace. Preservation means that WorldServer will not modify any whitespace found in the HTML element. Normalization means that WorldServer will replace any whitespace found in the HTML element with a single space_Whitespace.

Option Description
Whitespace in content

This option controls the whitespace settings for the translatable content in HTML elements which are not subject to a parser rule.

For HTML elements subject to a parser rule, WorldServer only applies this global Whitespace in content setting if the Whitespace property on the Add/Edit/Copy Rule page is set to Inherit from parent and the last specified parent is also set to Inherit from parent.

Set the Whitespace property to one of the following:

  • Always preserve—WorldServer keeps the whitespace it finds and does not replace it with a single space.
  • Normalize unless xml:space='preserve'—WorldServer replaces whitespace with a single space unless the element includes the attribute xml:space='preserve'.
  • Always normalize—WorldServer always replace whitespace with a single space, ignoring any xml:space='preserve' attribute.
Whitespace in tags This option controls the settings for the whitespace found in non-translatable content and in element attributes. Check the Always normalize option if you want WorldServer to replace any whitespace found with a single space.
Note:
  • WorldServer normalizes whitespace when converting the HTML document to the *.sdlxliff format.
  • Normalization does not change the whitespace between structure tags as this is not visible in the Editor anyway.