You are not logged in.
Pages: 1
A numeric character reference (NCR) is a common markup construct used in SGML and SGML-derived markup languages such as HTML and XML. It consists of a short sequence of characters that, in turn, represents a single character. Since WebSgml, XML and HTML 4, the code points of the Universal Character Set (UCS) of Unicode are used. NCRs are typically used in order to represent characters that are not directly encodable in a particular document (for example, because they are international characters that don't fit in the 8-bit character set being used, or because they have special syntactic meaning in the language). When the document is interpreted by a markup-aware reader, each NCR is treated as if it were the character it represents.
Occasionally the components we integrate with may not accept or users may not want to see UCS characters. These can be removed/substituted using the Stylesheet (XSLT) Translate command. The following example shows how one can change an "En Dash" to a normal "Dash" (Minus Sign)
<xsl:template match="text()">
<xsl:value-of select='translate(., "–", "-")'/>
</xsl:template>
Thank You StephanB for this
Additional Information:
https://en.wikipedia.org/wiki/Numeric_c … _reference
Offline
Here is my style sheet to translate the En Dash “–” to Dash (Minus Sign) “-”
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:strip-space elements="*"/>
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
<xsl:template match="text()">
<xsl:value-of select='translate(., "–", "-")'/>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Offline
Pages: 1