Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2013, 01:12 PM
Registered User
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT Help with Substrings

I have this XML

<?xml version="1.0" ?>
<article>
<body>
<p>TEST Content Start</p>
<p><a href="resource:article:WN_Test/default:PW_C157504.xml:public"><img src="/cmscontrib2/pw_a056436.gif" web_source="resource:image:WN_Test/default:PW_A056436.gif:public" alt="Test Image" /></a></p>
<p>TEST Content END</p>
</body>
</article>

and I need an XSL that will translate this xml to html that looks something like this.


<body>
<p>TEST Content Start</p>
<p><a href="/WN_test/articles/PW_C157504.xml"><img src="/WN_Test/pw_a056436.gif" alt="Test Image" /></a></p>
<p>TEST Content END</p>
</body>

Pretty simple, it's just a link on an image.

I can build an href link to basic text, and I can build a good image link, but I can't figure out how to build a link to something else when it' on an image. Should be easy... Any help would be greatly appreciated

Last edited by drob; February 22nd, 2013 at 04:11 PM..
 
Old February 24th, 2013, 08:22 AM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Hi,

What part of your xslt is giving you trouble? If you post some of your xslt, I am sure there is a solution.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Best approach(es) for processing varying substrings CanOfBees XSLT 2 February 17th, 2013 09:16 PM
Advanced extracting of substrings Aeren XSLT 1 May 6th, 2012 07:47 AM
XSLT substrings chroniclemaster1 XSLT 1 October 4th, 2007 05:29 PM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.