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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:13:11+00:00 2026-06-15T20:13:11+00:00

I am transforming data from an XML file via XSLT that will display as

  • 0

I am transforming data from an XML file via XSLT that will display as a table on an HTML page. (The XML and XSLT files are called using javascript code that is identical to what can be found on the w3schools XSLT on the Client page.) One of my XML fields contains a URL. My transform creates a href attribute for that field, but instead of posting the URL from the XML file, it replaces it with the URL for the HTML page that the table will live in.

My XML looks like this:

<database>
<Table>
<Title>Title</Title>
<URL value="www.link.com">Watch this video</URL>
</table>        

My XSLT looks like this:

<table>
<tr>
<th>Title</th>
<th>URL</th>
</tr>
<xsl:for-each select="database/table">
<tr>
<td><xsl:value-of select="Title"/></td>
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="URL/@VALUE"/>
</xsl:attribute>
<xsl:value-of select="URL"/>
</a>
</td>
</tr>
</xsl:for-each>
</table>

But on the HTML page, the “Watch this video” link is not “www.link.com” but “www.HTMLpage.com.” The same thing happens if I add the XSL transform to the XML document and open it in a browser – the links still go to the address of that page, not externally where I want them.

  • 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-06-15T20:13:13+00:00Added an answer on June 15, 2026 at 8:13 pm

    XPath is case-sensitive.

    Replace:

    <xsl:value-of select="URL/@VALUE"/>
    

    with:

    <xsl:value-of select="URL/@value"/>
    

    Now the result of the corrected transformation, when applied on the provided XML document (also needs similar correction and a closing tag), produces the wanted result:

    <table>
       <tr>
          <th>Title</th>
          <th>URL</th>
       </tr>
       <tr>
          <td>Title</td>
          <td>
             <a href="www.link.com">Watch this video</a>
          </td>
       </tr>
    </table>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XSLT file for transforming data from table to INSERT statements. So
I need a fastest solution for transferring data from XML file to MySQL tables.
We've got a mature body of code that loads data from files into a
I have an xslt written for transforming from one xml format to the other.
I am transforming following XML to generate HTML. XML <clause code=section6> <variable col=1 name=R1C1
Can any one help in transforming my xml though XSLT. I am new to
I am using xslt 2.0 for transforming one xml format to another xml format.But
I'm writing a system at the moment that needs to copy data from a
I have a maintenance application that has to turn enterprise data (from various databases/tables)
I am processing a big .gz file using PHP (transfering data from gz 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.