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

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,266
Members
46,865
Latest member
AveryHamme

Latest Threads

Top