I had this same problem. XSL doesn't allow the '<' character as part of
HTML tag attribute values.
You can correct this problem by doing something like the following:
<xsl:element name="a">
<xsl:attribute name="href">www.website.com</xsl:attribute>
</xsl:element>
Try this out.
Brett
-----Original Message-----
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 1:03 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem generating href
Just a thought. Is the compiler getting messed up with all of the
double quotes?
does this work?
<a href='mailto:<xsl:value-of select="email"/>' >
<xsl:value-of select="email"/></a>
Using single quotes for the href attribute?
HTH,
Pete
[EMAIL PROTECTED] wrote:
> I'm trying to create an online directory for a club I'm
> in. I want to include a mailto link with the members
> email address. I've got an xml file with the member
> info, and an xsl file to convert it to html. Here's the
> part of the xml file that's relevant:
>
> <memberlist>
> <member>
> <email>[EMAIL PROTECTED]</email>
> </member>
> </memberlist>
>
> Here's the xsl
> <xsl:template match="memberlist">
> <table border="1" width="100%">
> <tr>
> <th>Email</th>
> </tr>
> <xsl:for-each select="member">
> <tr>
> <td>
> <a href="mailto:<xsl:value-of select="email"/>" >
> <xsl:value-of select="email"/></a>
> </td>
> </tr>
> </xsl:for-each>
> </table>
> </xsl:template>
>
> When I try this, I get this error in the Tomcat command
> window:
>
> The value of attribute "href" must not contain the '<'
> character.
>
> Indicating line and column of the '<' for the xsl:value-
> of I'm embedding in the href.
>
> Is there anyway to get this to do what I want?
>
> Thanks for any help
>
> --
> ----------------------------------------------------
> All opinions expressed are my own
> Marc Robertson
>
> "The only people that never fail, are those that
> never try!" Anon.