This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: a href incorporation
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] a href incorporation
- From: Bryan Tulloch <b dot tulloch at solicitec dot com>
- Date: Thu, 19 Apr 2001 10:20:31 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Tanzila,
You need to declare href as an xsl:attribute of an anchor tag, thus:
<xsl:template match="Grasslands/LinksForGenus" priority= "1">
<h3>
<a name="Label0045"></a>
<font color="#00007F"><i>Links for the genus:</i></font>
</h3>
<ul>
<xsl:for-each select="Link">
<li><font color="#008000">
<a>
<xsl:attribute name="href">
http://www.bbc.co.uk
</xsl:attribute>
<xsl:value-of select="Address" />
</a>

<xsl:text />
<xsl:value-of select="Name" />
</font></li>
</xsl:for-each>
</ul>
</xsl:template>
The above should work.
Bryan Tulloch
-----Original Message-----
From: Tanzila Mohammad [mailto:tmohammad@entier-solutions.com]
Sent: Thursday, April 19, 2001 9:57 AM
To: xsl-list@lists.mulberrytech.com
Subject: Fw: [xsl] a href incorporation
I have the following xml:
<Grasslands>
<LinksForGenus>
<Link>
<Address href="http://www.bbc.co.uk">BBC</Address>
<Name>This is the home page for the BBC </Name>
</Link>
</LinksForGenus>
</Grasslands>
I want the following output: (bullet-pointed)
* BBC (as a hyperlink); This is the home page for the BBC
My xsl:
<xsl:template match="Grasslands/LinksForGenus" priority= "1">
<h3>
<a name="Label0045"></a>
<font color="#00007F"><i>Links for the genus:</i></font>
</h3>
<ul>
<xsl:for-each select="Link">
<li><font color="#008000">
<xsl:value-of select="Address" />;
<xsl:text />
<xsl:value-of select="Name" />
</font></li>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template match="Grasslands/LinksForGenus">
</xsl:template>
The problem is incorporating the "a href".
Thanks.
Tanz
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list