This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
AW: Converting number to ASCII-character
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: AW: [xsl] Converting number to ASCII-character
- From: "Mengel Andre (FV/SLM) *" <Andre dot Mengel at de dot bosch dot com>
- Date: Mon, 24 Sep 2001 11:59:09 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Dear Chris,
now it works.
thanx,
André
> -----Ursprüngliche Nachricht-----
> Von: Chris Bayes [mailto:chris@bayes.co.uk]
> Gesendet: Montag, 24. September 2001 11:43
> An: xsl-list@lists.mulberrytech.com
> Betreff: RE: [xsl] Converting number to ASCII-character
>
>
> Andre,
> It's early Monday morning. I am sure he meant
> concat('&#', $number,
> ';') which produces A which displays in the browser as A
>
> Ciao Chris
>
> XML/XSL Portal
> http://www.bayes.co.uk/xml
>
>
> > -----Original Message-----
> > From: owner-xsl-list@lists.mulberrytech.com
> > [mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of
> > Mengel Andre (FV/SLM) *
> > Sent: 24 September 2001 10:04
> > To: 'xsl-list@lists.mulberrytech.com'
> > Subject: AW: [xsl] Converting number to ASCII-character
> >
> >
> > Dear Michael,
> >
> > first of all thank you for the fast response refering
> > to my question.
> >
> >
> >
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Michael Kay [mailto:mhkay@iclway.co.uk]
> > > Gesendet: Montag, 24. September 2001 10:29
> > > An: xsl-list@lists.mulberrytech.com
> > > Betreff: RE: [xsl] Converting number to ASCII-character
> > >
> > >
> > > > I have a variable, which contains a number and I want to
> > output the
> > > > appropriate
> > > > ASCII- charater.
> > > > For example
> > > >
> > > > <xsl:variable name = "number" select = "65"/>
> > > >
> > > > should output an A.
> > > > Is there a function or something similar to solve this issue ?
> > >
> > > The closest equivalent is:
> > > <xsl:value-of select="concat('&', $number, ';')"
> > > disable-output-escaping="yes"/>
> > > which works because Unicode character values are a superset
> > of ASCII.
> > >
> >
> > this seemed to be the best solution for me. But the xsl:value
> > element outputs the following:
> >
> > &65;
> >
> >
> >
> > > If you want to avoid d-o-e, you can
> > > (a) escape into an extension function
> > > (b) use
> > >
> > > <xsl:variable name="ascii">
> > > !"#$%^....abcde...ABCDE....</xsl:variable>
> > > <xsl:value-of select="substring($ascii, $number - 31, 1)"/>
> > >
> > > Mike Kay
> > >
> > > XSL-List info and archive:
> > http://www.mulberrytech.com/xsl/xsl-list
> > >
> >
> > XSL-List info
> > and archive: http://www.mulberrytech.com/xsl/xsl-list
> >
> >
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list