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 May 24th, 2004, 04:43 PM
Registered User
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to allenatmarc Send a message via Yahoo to allenatmarc
Default Creating a html in an xsl document

I have an XML document that I am transforming to HTML using an XSL sheet. At a certain point in the HTML I want to create links based on some of the information in the XML document.

This is what I have as a link:

<tr><td><a href="<xsl:value-of select="$mainLink" />">Sample Source </a></td></tr>

I know this is wrong because of the < > symbols in the href tag. Can someone provide some insight on how to have this statement work.

Old May 24th, 2004, 07:21 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts


  <xsl:attribute name='href'><xsl:value-of select='$mainLink'/></xsl:attribute>
  Sample Source

This will create the HREF attribute in the <a> tag.

Old June 16th, 2004, 04:10 AM
Authorized User
Join Date: Jun 2003
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kabe

or cleaner ...

<tr><td><a href="{$mainLink}">Sample Source </a></td></tr>

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using XML Spy and an XSL document. AjayLuthria XSLT 3 June 12th, 2007 02:43 PM
xsl:result-document instruction bonekrusher XSLT 3 April 12th, 2007 06:01 PM
document('') and xsl from javascript strings AlexBirch XSLT 1 August 29th, 2006 08:47 AM
Creating a "WORD" document in ASP mcinar Classic ASP Basics 7 June 30th, 2005 03:44 PM
Printing an html document amc Dreamweaver (all versions) 1 May 31st, 2004 11:42 AM

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