RE: [xsl] displaying strings containing ampersand entities

Subject: RE: [xsl] displaying strings containing ampersand entities
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 21 Aug 2006 13:49:56 +0100
> <xsl:var name="s" as="xs:string" value="Tom &amp; Jerry"/>
> 
> Trying to display it with <xsl:message> gives 'Tom &amp; Jerry'
> instead of 'Tom & Jerry'
> 

The format and destination of xsl:message output are entirely
implementation-defined, so you need to ask the question in relation to a
particular product.

If you're using Saxon, for example, you can ask for xsl:message output to be
serialized using a TextEmitter rather than an XmlEmitter. (That is, using
the TEXT output method rather than the XML output method).

Michael Kay
http://www.saxonica.com/

Current Thread