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

Related Questions

I am working Stripes framework. I have a table which contains 100's of rows
I am actually working on a Framework development, which means require a really strong
I'm working on a framework and have run into an issue. I noticed that
I am working on zend framework. I have mistakenly created some actions which are
I am working on .Net framework. I have created an application that creates a
I'm working with a framework that uses collections derived from System.Collections.CollectionBase . Users have
actually i'm working with .Net Framework 3.5, so i have all these nice little
I am working with Zend Framework. I have a form with some fields, all
I am working on xmpp framework. I have done most of initial things. I
I'm working on a framework right now, part of which requires Jython. I just

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.