Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3984690
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:48:01+00:00 2026-05-20T05:48:01+00:00

Hi all I am using xslt 1.0. I have the char code as FOA7

  • 0

Hi all
I am using xslt 1.0. I have the char code as FOA7 which has to displayed as a corresponding character. My input is

<w:sym w:font="Wingdings" w:char="F0A7"/>

my xslt template is

<xsl:template match="w:sym">
    <xsl:variable name="char" select="@w:char"/>
    <span font-family="{@w:fonts}">        
    <xsl:value-of select="concat('&#x',$char,';')"/>
    </span>
</xsl:template>

It showing the error as ERROR: 'A decimal representation must immediately follow the "&#" in a character reference.'

Please help me in fixing this..Thanks in advance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:48:02+00:00Added an answer on May 20, 2026 at 5:48 am

    This isn’t possible in (reasonable) XSLT. You can work around it.

    • Your solution with concat is invalid: XSLT is not just a fancy string-concatenator, it really transforms the conceptual tree. An encoded character such as &#xf0a7; is a single character – if you were to somehow include the letters & # x f 0 a 7 ; then the XSLT processor would be required to include these letters in the XML data – not the string! So that means it will escape them.
    • There’s no feature in XSLT 1.0 that permits converting from a number to a character with that codepoint.
    • In XSLT 2.0, as Michael Kay points out, you can use codepoints-to-string() to achieve this.

    There are two solutions. Firstly, you could use disable-output-escaping. This is rather nasty and not portable. Avoid this at all costs if you can – but it will probably work in your transformer, and it’s probably the only general, simple solution, so you may not be able to avoid this.

    The second solution would be to hardcode matches for each individual character. That’s a mess generally, but quite possible if you’re dealing with a limited set of possibilities – that depends on your specific problem.

    Finally, I’d recommend not solving this problem in XSLT – this is typically something you can do in pre/post processing in another programming environment more appropriately. Most likely, you’ve an in-memory representation of the XML document to be able to use XSLT in the first place, in which case this won’t even take much CPU time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using xslt/xpath, I need to be able to select the two elements which have
Using XSLT 1.0 - I have the following xml and I an trying to
I need to match and remove all tags using a regular expression in Perl.
How can I get the start and end positions of all matches using the
Spending most of my time in Visual Studio and using all the IDE tools,
I do this all the time using VNC and it is very easy, but
Using Firebird, I want to combine the results of two queries using UNION ALL,
Are all URLs encrypted when using TLS/SSL (HTTPS) encryption? I would like to know
I am using running a simple find all and paginating with willpaginate, but I'd
I'm using this script to display all the images in a folder, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.