b.writeText (text : string, [encoding : string]) : void

The method writeText is used to write the given text into the binary output stream. By default, it uses the configured literal encoding of the render engine. You may control the encoding by the usage of the optional parameter encoding.

<xsl:stylesheet xmlns:xsl="" xmlns:b="" xmlns:onion="" version="1.0">
<xsl:output method="xml" />
<xsl:template match="/">
<xsl:value-of select="b.writeText('Hello world', 'ISO-8859-15')" />
<b:output mimeType="text/plain" />
Textual output within a binary method

In this example "Hello World" is written as ISO encoded text into the binary output channel. In addition, the dynamic content type is set to text/plain.