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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:17:24+00:00 2026-05-19T05:17:24+00:00

In my XML document, I am pulling the content of a <TextBlock> that contains

  • 0

In my XML document, I am pulling the content of a <TextBlock> that contains images. The XML shows:

<img src="/templates_soft/images/facebook.png" alt="twitter" />

When I view the page, the image doesn’t show up because it is not at the same path as the original page.

I need to add the rest of the URL for the images to display. Something like http://www.mypage.com/ so that the image displays from http://www.mypage.com/templates_soft/images/facebook.png

Is there a way to do this?

  • 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-19T05:17:25+00:00Added an answer on May 19, 2026 at 5:17 am

    Use:

    <img src="{$imageBase/}templates_soft/images/facebook.png" alt="twitter" />
    

    where the xsl:variable named $imageBase is defined to contain the necessary prefix (in your case "http://www.mypage.com").

    Here is a complete XSLT solution:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output omit-xml-declaration="yes" indent="yes"/>
    
     <xsl:param name="pimageBase" select="'http://www.mypage.com'"/>
    
        <xsl:template match="img">
       <img src="{concat($pimageBase, @src)}" alt="{@alt}"/>
      </xsl:template>
    </xsl:stylesheet>
    

    when this transformation is applied on the following XML document:

    <img src="/templates_soft/images/facebook.png" alt="twitter" />
    

    the wanted, correct result is produced:

    <img src="http://www.mypage.com/templates_soft/images/facebook.png" alt="twitter"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a xml/php document that is pulling from a Magento Commerce database,
I have an XML document that contains a series of item nodes that look
My xml document has a element that can contains multiple child elements. In my
Have a source xml document that uses namespace containing prefixes and a default namespace.
my xml document looks somewhat like that (Values are both xsl:hexBinary ): <Offsets> <Offset>
I have an XML document that I need to load and in the document
I'm pulling images into a document via json/ajax. After they get pulled in, I'd
I have an xml formatted document that looks like this: <?xml version=1.0 encoding=windows-1250?> <
I have an XML document that has several <item> elements. Inside each, there might
I have a simple xml document that looks like the following snippet. I need

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.