The <xsl:output-character> element allows a character in the result tree to be mapped to a specific string used to represent this character in the serialized output.
The element is new in XSLT 2.0.
<xsl:output-character character = char string = string />
<xsl:output-character> only appears as a child of the <xsl: character-map > element.
Name | Value | Meaning |
---|---|---|
character mandatory | Character | A single XML character; the character that is to be replaced during serialization |
string mandatory | String | Any string; the string that is to replace the character during serialization |
None. The <xsl:output-character> element is always empty.
The <xsl:output-character> element defines a mapping for a single character within a character map. The way character maps work is fully described in the entry for the <xsl:character-map> element on page 229.
Note that the character to be replaced, and the string that is to replace it, must consist entirely of valid XML characters , otherwise it would not be possible to represent them in the stylesheet. Also note that any special characters must be escaped using the usual conventions. For example, if you want the ampersand character to be mapped to the string «&ersand; », write:
<xsl:output-character character="&" string="&ampersand;"/>
<xsl:character-map> on page 229