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

  • SEARCH
  • Home
  • 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 490635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:55:46+00:00 2026-05-13T01:55:46+00:00

I am working in a framework (cocoon) which means that the pages after I

  • 0

I am working in a framework (cocoon) which means that the pages after I produce them are re-transformed by processes I have little or no control of. What I am doing is making a web service call, then transforming the results into an HTML page for presentation. Sounds like a job for XSLT. Everything works fine, until the data returned in an XML text node has an ‘&’ character in it. The returned XML is properly escaped, but I want to put it into the href attribute of an anchor node. Everything I have tried ends up with the unescaped ‘&’ character showing up in the href attribute. For example:

If the node returned from the web service looks like:

<ns:name>Foo&amp;Bar</ns:name>

The resulting <a> token (in the page source) looks like:

<a href="ADifferentPage.jsp?name=Foo&Bar">Foo&amp;Bar</a>

My current XSLT code looks like:

<a>
  <xsl:attribute name="href">
    ADifferentPage.jsp?name=<xsl:value-of select="ns:name" />
  </xsl:attribute>
  <xsl:value-of select="ns:name" />
</a>

The desired result is:

<a href="ADifferentPage.jsp?name=Foo&amp;Bar">Foo&amp;Bar</a>
  • 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-13T01:55:46+00:00Added an answer on May 13, 2026 at 1:55 am

    The result is as expected. When the output method is set to “html”, attribute values are not xml escaped. If it’s possible, try switching the output method to “xml”, when you’re trying to deliver xml/xhtml

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

Sidebar

Ask A Question

Stats

  • Questions 235k
  • Answers 235k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer No this isn't true: you can have the AppEngine robot… May 13, 2026 at 6:12 am
  • Editorial Team
    Editorial Team added an answer Sending cStringUsingEncoding: to encodedString can only work if encodedString is… May 13, 2026 at 6:12 am
  • Editorial Team
    Editorial Team added an answer echo number_format(10000); More info here: https://www.php.net/number_format May 13, 2026 at 6:12 am

Related Questions

In a previous question, I asked about various ORM libraries. It turns out Kohana
Has anyone come across a framework or library for Delphi to simplify the generation
I am working on 3 maven projects. They're all separate projects, but they share
Unfortunately, there is no Semaphore in System.Threading when using the .NET Compact Framework. I'm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.