how can I display "&#34" etc. after xml-xsl transformation?

DrTebi

Usenet Archive
Joined
Jun 25, 2004
Messages
1
Reaction score
0
Hello,
I have the following problem:
I used to "encode" my email address within links, in order to avoid (most) email spiders. So I had a link like this:
<a
href="

This would work like a regular mailto link in any browser, but wouldn't be visible to spiders if they don't have a function to decode it.

The problem is if I use this in an XSL stylesheet, it gets converted to my email address:
<a href="

Now I tried this in the XSL stylesheet:
<a><xsl:attribute
name="href"><![CDATA[

But that resulted in
<a
href="

--which does not work in a browser as a link.

Can anyone please point me to the right direction?

Thanks,
DrTebi

P.S.: I am using PHP5 for XML/XSL transformations, which is based on libxml2
 

Patrick TJ McPhee

Usenet Archive
Joined
Apr 2, 2000
Messages
269
Reaction score
0
[...]

% Now I tried this in the XSL stylesheet:
% <a><xsl:attribute
% name="href"><![CDATA[
%
% But that resulted in
% <a
% href="

Try
<a><xsl:attribute name="href">
<xsl:text>
<xsl:text disable-output-escaping='yes'><![CDATA[Dr]]></xsl:text> <xsl:text disable-output-escaping='yes'><![CDATA[Te]]></xsl:text> <xsl:text disable-output-escaping='yes'><![CDATA[bi]]></xsl:text> <xsl:text disable-output-escaping='yes'><![CDATA[@y]]></xsl:text> <xsl:text disable-output-escaping='yes'><![CDATA[ah]]></xsl:text> <xsl:text disable-output-escaping='yes'><![CDATA[oo]]></xsl:text> <xsl:text disable-output-escaping='yes'><![CDATA[.c]]></xsl:text> <xsl:text disable-output-escaping='yes'><![CDATA[om]]></xsl:text> </xsl:attribute></a>

(that is, try disable-output-escaping -- I've just put several of them there to keep the line lenghts shorter)
 

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
548,208
Messages
3,104,798
Members
249,594
Latest member
henrywalsh

Latest Threads

Top