![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - ACII conversion in XSLT [Thread Next] Re: ACII conversion in XSLTTo: NULL Date: 4/3/2005 12:42:00 PM Try this: <xsl:value-of select=" concat(&#', $sChar, ';') /> Trotter Hardy "Grimmie" <This is fake> wrote in message news:utAdTbsCFHA.1604@T...... > Hello all, > > The problem is this: > I have a (variable) number and want to change it into an ASCII character. > ie A = 'A', B = 'B' etc. > The only thing is 65 comes from a variabele > > So basically it looks something like this: > <xsl:template name="ConvertASCII"> > <xsl:param name="iPosition"/> > <xsl:variable name="iColumn"> > -- Do some calculations with position-- > </xsl:variable> > <xsl:variable name="sChar">&#<xsl:value-of > select="$iColumn"/>;</xsl:variable> > <xsl:value-of select="sChar"/> > </xsl:template> > Off course this doen't work. because of the "&#" int the sChar variabele. > > ---------------------------------------------------------------------------- > ---------- > > This: > <xsl:text>&#<xsl:value-of select="sChar"/>;</xsl:text> > Also doesn't work because you can't have a variabele inside xsl:text > > ---------------------------------------------------------------------------- > ---------- > > This: > <xsl:when test="$sChar= 65">A</xsl:when> > <xsl:when test="$sChar= 66">B</xsl:when> > <xsl:when test="$sChar= 67">C</xsl:when> > --- Etc --- > works, but it looks like crap repeating it all for the alphabet > > > So what I want is a "Num => ASCII" function, but the NUM is a variabele. > > > > > > > > | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
