Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: ACII conversion in XSLT

From: "Trotter Hardy" <thardy@--.--->
To: NULL
Date: 4/3/2005 12:42:00 PM
Try this:

<xsl:value-of select=" concat(&amp;#',  $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 &#65; = 'A', &#66; = '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.
>
>
>
>
>
>
>
> 




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent