Subject: Setting the value of the HREF attribute From: Nigel Byrnes <byrnes@xxxxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 08 Feb 1999 11:12:43 +0000 |
Dear XSL-ers To become familiar with XML & XSL, I am in the process of representing a web site using these technologies. I have just reached a bit of a hurdle and wondered if you guys could offer some advice.... Below is a fragment from a xml document which states Philips Research as a "participant". I want to use XSL to set produce a HTML page that includes a link to the Philips Research www site. My problem is that i don't know how to set the value of the HTML's HREF attribute to the specified URL. I have also included a fragment of the XSL style sheet which is to format the xml into html. If someone could offer a solution to my problem, that would be great. Thanks Nigel >>>>> Fragment of XML document <?xml version="1.0" encoding="UTF-8"?> <participants> <participant link="http://www.research.philips.com">Philips Research (UK)</participant> </participants> >>>>>>>>> Fragment of XSL Stylesheet <xsl:template match="participants"> <xsl:for-each select="participant"> <!-- set the HREF attribute to the value of @link --> <!-- this doesn't work: --> <!-- <A HREF="<xsl:value-of select="@link"/>">click here</A> --> <xsl:apply-templates/> </xsl:for-each> </xsl:template> -- Nigel Byrnes "We continue..." Pete Tong Software Engineering and Applications Group, Philips Research Labs, Redhill. Tel: +44 (0)1293 815578 RH1 5HA. Fax: +44 (0)1293 815024 UK. GSM: +44 (0)7899 940391 Email: byrnes@xxxxxxxxxxxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
?<xsl:apply-templates select="tag"/, Stephen Yearl | Thread | Re: Setting the value of the HREF a, Bovone Stefano |
Re: parent attribute? aaargh, Henry S. Thompson | Date | RE: parent attribute? aaargh, Mattias Konradsson |
Month |