Esko Logo Back to Esko Support
Choose your language for a machine translation:
Skip to end of metadata
Go to start of metadata

Question

The <text char="linefeed"/> for linefeed and/or <text char="space"/> for space are not working when used in the XML for Dynamic Content.

Spaces and linefeeds are not applied.

Answer

Dynamic Content does not have any method to convert <text char="linefeed"/> or <text char="space"/> to either new line or space.

Dynamic Content by default behaves as a web browser and strips out extra spaces and returns (all whitespaces in general) from the XML content. However in Preferences, it is possible to switch off this option so any whitespace within the linked element is preserved in the text.

For adding spaces it's possible to use Non-Breaking Space entity &#xA0; or &#160; in the XML file. This entity is preserved anyway. Then the element may look like:

<text>Here we have three&#xA0;&#xA0;&#xA0;spaces</text>

For adding line breaks it's possible to use the Style Mapping feature. There is an option to use </br> tags to force line breaks (this option is enabled by default). Besides this, any XML tag can be mapped there to add a new line at the end. By default it is a <p> tag, but any tag can be added to the Style mapping list with an option to define a paragraph. So, for example, if in the mapping <text> tag is set to define a paragraph, the following:

<content>
   <text>First line</text><text>Second line</text> The rest of the text.
</content>

will be interpreted as:

First line
Second line
The rest of the text
Article information
Applies to

Dynamic Content 14.x.x, 16.x.x

Created18-Aug-15
Last revised26-Oct-17
Authoravdw, tota
SC Number00521858
Contents