SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Saxon on .NET
Extensibility
Saxon Extensions
| Introduction
| EXSLT Extensions
| Extension attributes (XSLT only)
| Additional serialization parameters
| Extension functions
» | Extension instructions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# saxon:entity-ref

The saxon:entity-ref element is useful to generate entities such as &nbsp; in HTML output. To do this, write:

    <saxon:entity-ref name="nbsp"/>

Note: the preferred way to produce a non-breaking space character in the output is simply to write `&#160;` or `&#xa0;` in the stylesheet. By default, with HTML output, this will be serialized as `&nbsp;`, though the way it is serialized doesn't actually matter as far as the HTML browser is concerned.

`saxon:entity-ref` is permitted only in contexts where `disable-output-escaping` would be permitted: that is, when writing to a serialized output destination.

Next