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 July 4th, 2003, 05:05 AM
Registered User
 
Join Date: Jun 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with Attributes

Hi chaps,

Can anyone help me? I have an XML file that describes a list of options in a menu, with each item I have a link to a web file e.g. <link>http://MyFile.htm</link>, I am using XSL to transform the file into a webpage and am trying to use the link of the item in a <a href="<xsl:value-of select="link"/>"> but the parser tells me I can't put <xsl:value-of select="Link"/> in an attribute, I've looked around on the web but am unable to find any examples of people doing the same!

Can someone tell me how it's done?

Cheers

Pete
 
Old July 8th, 2003, 01:00 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Try:
<a href="{link}">
This technique is called 'Attribute value templates'.


--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
restrictions on attributes kfir XML 2 May 30th, 2006 04:35 AM
Elements and attributes Morrislgn XSLT 1 June 20th, 2005 11:13 AM
How to get certain ADSI Attributes grassi3000 C# 0 August 31st, 2004 12:03 PM
How to get Attributes of a element? g_srihari9 XSLT 1 August 18th, 2003 07:11 AM
Problems with Attributes pj_bennett XML 5 July 5th, 2003 07:44 AM





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