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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:38:19+00:00 2026-05-26T06:38:19+00:00

I have a funny problem with presenting links in Chrome using XSL: every link

  • 0

I have a funny problem with presenting links in Chrome using XSL: every link concatenated with the HEX symbol “%0A”.
so if the link is “www.google.com”, it will be presented as “www.google.com%0A”.
this problem only occurs in google chrome – Internet Explorer and FireFox present links correctly.
so my question is: how do I prevent google chrome from messing with the links?
here is a sample of the XML file:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="builtMathCSStatisticsXML.xsl"?>
<channel>
<item>
<title>algrbra
</title>
<type>class notes
</type>
<staff>Noga Alon
</staff>
<semester>
</semester>
<year>2011
</year>
<donor>anonymous
</donor>
<link>https://skydrive.live.com/self.aspx?path=%2f%d7%9e%d7%aa%d7%9e%d7%98%d7%99%d7%a7%d7%94%2f%d7%90%d7%9c%d7%92%d7%91%d7%a8%d7%94%20%d7%911.%d7%a9%d7%99%d7%a2%d7%95%d7%a8%d7%99%d7%9d%20%d7%95%d7%aa%d7%a8%d7%92%d7%99%d7%9c%d7%99%d7%9d.%d7%a0%d7%95%d7%92%d7%94%20%d7%90%d7%9c%d7%95%d7%9f%5e.%d7%aa%d7%a9%d7%a1%5e4%5e4%d7%96%20-%20%d7%a8%d7%95%d7%a2%d7%99%20%d7%a7%d7%9c%d7%99%d7%99%d7%9f.pdf&amp;cid=1f8a5680599afff9
</link>
</item>
...
</channel>

and here is the xsl file:

<?xml version="1.0"?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <head>
  <script src="sorttable.js"></script>
  </head>
  <body dir="rtl">
    <h2>Math CS and Statistics</h2>
    <table class="sortable">
    <thead>
      <tr bgcolor="#9acd32">
        <th>course</th>
        <th>type</th>
        <th>proffesor</th>
        <th>semster</th>
        <th>year</th>
        <th>donors</th>
        <th>links</th>
      </tr>
      </thead>
      <tbody>
      <xsl:for-each select="channel/item">
      <xsl:sort select="title" />
      <tr onMouseOver="this.bgColor='yellow';" onMouseOut="this.bgColor='white';">
        <td><xsl:value-of select="title"/></td>
        <td><xsl:value-of select="type"/></td>
        <td><xsl:value-of select="staff"/></td>
        <td><xsl:value-of select="semester"/></td>
        <td><xsl:value-of select="year"/></td>
        <td><xsl:value-of select="donor"/></td>
        <td>
    <a target="_blank"><xsl:attribute name="href">
         <xsl:value-of select="link"/>
        </xsl:attribute>link</a>
        </td>
      </tr>
      </xsl:for-each>
      </tbody>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

thanks!

  • 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-26T06:38:20+00:00Added an answer on May 26, 2026 at 6:38 am

    This behavior is according to the XSLT 1.0 Spec, and the explanation is rather tricky:

    NOTE:When an xsl:attribute contains a text node with a newline, then the XML output must contain a character reference. For example,

    <xsl:attribute name="a">x
    y</xsl:attribute>
    

    will result in the output

    a="x&#xA;y"
    

    (or with any equivalent character reference). The XML output cannot be

    a="x
    y"
    

    This is because XML 1.0 requires newline characters in attribute
    values to be normalized into spaces but requires character references
    to newline characters not to be normalized. The attribute values in
    the data model represent the attribute value after normalization. If a
    newline occurring in an attribute value in the tree were output as a
    newline character rather than as character reference, then the
    attribute value in the tree created by reparsing the XML would contain
    a space not a newline, which would mean that the tree had not been
    output correctly.

    So, if you really don’t want the character entity, write:

    <link>string</link>
    

    and not:

    <link>string
    </link>
    

    Alternatively, use:

    <xsl:attribute name="href">
     <xsl:value-of select="normalize-space(link)"/>
    </xsl:attribute>
    

    However, be aware that this will replace any group of non-leading or non-trailing whitespace characters with only a single space.

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

Sidebar

Related Questions

Have just started using Google Chrome , and noticed in parts of our site,
we have a funny problem with try catch and std::runtime_error. Can someone explain to
I have some funny noob problem. I try to run unit tests from commandline:
I have a pretty funny problem which involves loadView , viewDidLoad , viewWillAppear and
I have a funny problem. Doing DataContext.SubmitChanges() updates Count() in one way but not
So i have a funny problem. Subversion, you are not allowed to rename items
I have a very funny problem on my application, I get an error as
This is rather a funny problem I have ever come across, I have a
I have such a funny problem I thought I'd share with you. I cornered
I have a simple, mysterious problem with a label and using ajax to show

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.