Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Is there a way to get xml to IGNORE < and >

Reply
Thread Tools

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

 
 
Eric
Guest
Posts: n/a
 
      02-12-2007
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

 
Reply With Quote
 
 
 
 
p.lepin@ctncorp.com
Guest
Posts: n/a
 
      02-12-2007
On Feb 12, 9:38 am, "Eric" <(E-Mail Removed)> wrote:
> 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>

--
Pavel Lepin

 
Reply With Quote
 
 
 
 
Johannes Koch
Guest
Posts: n/a
 
      02-12-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) schrieb:
> <xsl:text>?subject=Support question</xsl:text>


A ' ' is not allowed in URLs, so change ot to Support%20question

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
 
Reply With Quote
 
p.lepin@ctncorp.com
Guest
Posts: n/a
 
      02-12-2007
On Feb 12, 12:59 pm, Johannes Koch <(E-Mail Removed)>
wrote:
> (E-Mail Removed) schrieb:
>
> > <xsl:text>?subject=Support question</xsl:text>

>
> A ' ' is not allowed in URLs, so change ot to
> Support%20question


Indeed. Although using an url-encode template would've been
an even better solution.

--
Pavel Lepin

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to say ignore case with "in"? tinnews@isbd.co.uk Python 7 04-07-2008 12:55 PM
Ruby newbie & XML - What's the simplest way to get XML data into a hash? darenbell@gmail.com Ruby 3 11-16-2006 11:23 PM
cin.ignore... better way wanted... =?ISO-8859-15?Q?Juli=E1n?= Albo C++ 6 10-29-2006 09:48 PM
Ignore + TEST + Ignore SpooderStank Computer Support 2 04-08-2004 11:26 AM
Searching for Exact Phrase - should I ignore the ignore words? Rob Meade ASP General 6 03-01-2004 11:28 AM



Advertisments