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 918417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:22:18+00:00 2026-05-15T18:22:18+00:00

I am having a certian issue with special characters in my XML. Bascially I

  • 0

I am having a certian issue with special characters in my XML.
Bascially I am splitting up an xml into multiple xmls using Xalan Processor.

When splitting the documents up I am using their value of the name tag as the name of the file generated. The problem is that the name contains characters that arent recognized by the XML processor like ™ (TM) and ® (R). I want to remove those characters ONLY when naming the files.

<xsl:template match="products">
    <redirect:write select="concat('..\\xml\\product\\en\\',translate(string(name),'&lt;/&gt; ',''),'.xml')">

The above is the XSL code I have writter to split the XML into multlpe XMLs. As you can see I am using hte translate method to subtitute ‘/’,'<‘,’>’ with ” from the name. I was hoping I could do the same with ™ (TM) and ® (R) but it doesnt seem to work.
Please advice me how I would be able to do that.

Thanks for you help 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-15T18:22:18+00:00Added an answer on May 15, 2026 at 6:22 pm

    I don’t have Xalan, but with 8 other XSLT processors this thransformation:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="text"/>
    
     <xsl:template match="text()">
       <xsl:value-of select="translate(., '&lt;/&gt;™®', '')"/>
       ===================
       <xsl:value-of select="translate(., '&lt;/&gt;&#x2122;&#xAE;', '')"/>
     </xsl:template>
    </xsl:stylesheet>
    

    when applied on this XML document:

    <t>XXX™ My Trademark®</t>
    

    produces the wanted result:

    XXX My Trademark
       ===================
       XXX My Trademark
    

    I suggest that you try to use one of the two expressions above — at least the second may work successfully.

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

Sidebar

Related Questions

I'm having a bit of an issue. I'm parsing a large xml file using
I'm having an issue where I'm using the camera app to take a photo
I'm having an odd issue in FF10 using jQuery 1.7.1. I have a gallery
Hey, im having this issue with cakephp, bascially i have a Has And Belongs
I'm having an issue with multiple UIButtons in a view. I'd like the buttons
I am having an issue with implicit conversions not working under certain circumstances (higher
I'm having issues deserializing certain Guid properties of ORM-generated entities using protobuf-net. Here's a
I'm fairly certain I'm having memory leaks using KO version 2.0. I have an
I'm having an issue with bad requests from certain search parameters. An example URL:
i'm having a strange issue with banding between certain colors of a gradient. to

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.