Link to home
Start Free TrialLog in
Avatar of paulCardiff
paulCardiff

asked on

XSL - display weblink

i have a weblink being returned as below

<xsl:value-of select="WebAddress"/>

the text stored in the XML is simply
www.domainname.com

How would i force this to be a weblink to open in a new window with a specific style/class applied to it?

thanks
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Instead of simply using:
<xsl:value-of select="WebAddress"/> 
try:
<xsl:element name="a">
 <xsl:attribute name="href"><xsl:value-of select="WebAddress"/></xsl:attribute>
 <xsl:value-of select="WebAddress"/>
</xsl:element>

Open in new window

Avatar of paulCardiff
paulCardiff

ASKER

thanks hielo

Almost there, if you click on the link it loads
http://localhost:3292/www.domainname.co.uk

How do i force it to remove the localhost/ existing domain name when live?

Also, how do i get it to open in a new window?, can i use target="_blank"
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial