This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Special Characters for Position Sepcific Output.
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Special Characters for Position Sepcific Output.
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 27 Jul 2001 09:40:47 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Sample ouput in normal case is
> *Steve *
>
> In case of input like <firstname>St&eve</firstname>,
> output will be
> *St&eve *
> which exceeds 25 characters.
>
> Please let me know, how can I handle this condition in XSL.
"&" is one XML character, even though it is serialized using 5 ASCII
characters. You can't control how the XML character is serialized; the above
string might equally have been output as
<![CDATA[*St&eve *]]>
And if you're outputting XML, why should you want a fixed length?
Usually people wanting fixed-format output are generating text, with
<xsl:output method="text">, in which case special characters like "&" will
not be escaped.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list