Altova StyleVision 2023 Basic Edition

A character in a text string is said to be escaped when it is written as a character reference or entity reference. Both types of references (character and entity) are delimited by an ampersand at the start and a semicolon at the end. For example:

 

the hexadecimal (or Unicode) character reference of the character A is A

the decimal character reference of the character A is A

the HTML (and XML) entity reference of the character & is &

the hexadecimal (or Unicode) character reference of the character & is &

the decimal character reference of the character & is &

the HTML (and XML) entity reference of the character < is &lt;

 

Output escaping

Output escaping refers to the way characters that are escaped in the input are represented in the output. A character is said to be output-escaped when it is represented in the output as a character or entity reference. Note that a character can only be output-escaped when it is escaped in the input (see table below for examples). In an SPS, output-escaping can be enabled or disabled for:

 

Fragments of static text,

The contents placeholder, and

Auto-Calculations

 

This is done with the disable-output-escaping attribute of the Text group of properties. The default value of this property is no, which means that output-escaping will not be disabled. So characters that are escaped in the input will be escaped in the output by default (see table below for examples).

 

To disable output escaping, do the following:

 

1.Select the (i) static text, or (ii) fragment of static text, (iii) contents placeholder, or (iv) Auto-Calculation for which you wish to disable output escaping.

2.In the Properties sidebar, select the Text group of properties for the Text item, and set the disable-output-escaping attribute to yes for the various outputs individually or for all outputs. The available values are:

 

For HTML (to set disable-output-escaping to yes for HTML output).

For Authentic (to set disable-output-escaping to yes for Authentic output). Note that disabling output escaping for Authentic View is enabled only in Enterprise editions of Authentic View (that is, in the Enterprise editions of  StyleVision, Authentic Desktop, Authentic Browser, and XMLSpy).

For all (to set disable-output-escaping to yes for all outputs except Text).

 

When output escaping is disabled for a particular output format (for example, HTML output), the selected text will not be escaped in that output format, but will be escaped in the other output formats.

 

Given below are some examples of text with output escaping disabled and/or enabled.

 

Static text

disable-output-escaping

Output text

&amp;

no

&amp;

&amp;

yes

&

&

no

&

&

yes

&

&lt;

no

&lt;

&lt;

yes

<

&#65;

no

&#65;

&#65;

yes

A

&amp;lt;

no

&amp;lt;

&amp;lt;

yes

<

&amp;amp;lt;

yes

&lt;

&amp;&lt;

yes

&<

 

Note:Disable-Output-Escaping is supported in Authentic View only in the Enterprise Editions of Altova products.

 

Using disabled output-escaping across output formats

If output-escaping is disabled, the text string can have significance in one output but no significance at all in another output. For example, consider the following input text, which has escaped characters (highlighted):

 

 &lt;b&gt;This text is bold.&lt;/b&gt;

 

If output-escaping is disabled, this text will be output as:

 

 <b>This text is bold.</b>

 

If output-escaping is disabled for HTML output and this output is viewed in a browser (as opposed to a text editor), the markup will be significant for the HTML browser and the text will be displayed in bold, like this:

 

 This text is bold.

 

However, if viewed in another output format, such as PDF, the markup that was significant in HTML will not necessarily be of significance in this other output format. In the particular case cited above, the unescaped text (output escaping disabled) will be output in PDF format as is, like this:

 

 <b>This text is bold.</b>

 

As the example above demonstrates, the output text obtained by disabling output-escaping might be interpretable as code in one output format but not in another. This should be clearly borne in mind when using the Disable-Output-Escaping property.

 

© 2017-2023 Altova GmbH