Is there a way to get xml to IGNORE < and >

E

Eric

I'm trying to build a mailto url like so:

<td class="{$sData}"><![CDATA[<a href="mailto:]]><xsl:value-of
select="email"/><![CDATA[?subject=Support question">]]><xsl:value-of
select="email"/><![CDATA[</a>]]></td>

The html that's rendered looks like I would expect my html source to,
however in the source there are &lt; and &gt; chraracters so my links
don't work. Any way to get it to just spit out what I have onto the
page?

-Eric
 
P

p.lepin

I'm trying to build a mailto url like so:

<td class="{$sData}"><![CDATA[<a
href="mailto:]]><xsl:value-of
select="email"
/><![CDATA[?subject=Support question">]]><xsl:value-of
select="email"/><![CDATA[</a>]]></td>

The html that's rendered looks like I would expect my
html source to, however in the source there are &lt; and
&gt; chraracters so my links don't work. Any way to get
it to just spit out what I have onto the page?

There is a way, but I'm not going to tell you, since it's
an obvious case of XY problem. Instead, here's the Right
Way to solve your problem:

<td class="{$sData}">
<a>
<xsl:attribute name="href">
<xsl:text>mailto:</xsl:text>
<xsl:value-of select="email"/>
<xsl:text>?subject=Support question</xsl:text>
</xsl:attribute>
<xsl:value-of select="email"/>
</a>
</td>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top