xsl-list
[Top] [All Lists]

RE: [xsl] Question Regarding the display of <a> tag from XML

2007-03-21 10:15:30
Many thanks to Steve and David.  Spencer, I'm sorry I didn't post my XSL...
I totally spaced that.

The copy-of worked!  I didn't even know about copy-of, so it was great to
learn something knew.

Thanks!
Tim

-----Original Message-----
From: Steve [mailto:subsume(_at_)gmail(_dot_)com] 
Sent: Wednesday, March 21, 2007 10:48 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Question Regarding the display of <a> tag from XML

use copy-of instead of value-of =)

If you think about it, <a>, while its still HTML, its also legitimate XML.

-Steve

On 3/21/07, Tim Golen <tim(_at_)golen(_dot_)net> wrote:
Hello,

I'm new to the group, and fairly new to XSL.  I'm using XML version 1.0
and
XSL version 1.0.  I'm building a site with PHP and I have a message stored
in a MySQL database that I'm trying to display to the user.  This is what
the message looks like in the database:

One of the swarms you have joined called "Whiskies Cat Food" has entered a
bid battle.  To view this swarm, click <a
href="index.php?module=swarm&amp;action=view&amp;swarmId=1">here</a>.

My xml looks like this:

<message>
                <from>Whiskies Cat Food</from>
                <subject>Swarm In Bid Battle!</subject>
                <timeSent>20070321113046</timeSent>
                <message><![CDATA[One of the swarms you have joined called
"Whiskies Cat Food" has entered a bid battle.  To view this swarm, click
<a

href="index.php?module=swarm&amp;action=view&amp;swarmId=1">here</a>.]]></me
ssage>


<deleteUrl>index.php?module=myeswarm&amp;action=deleteMessage&amp;messageId=
35</deleteUrl>
</message>

Unfortunately the XSL displays it exactly as what's in the database, and
the
anchor tags don't become a link.  If I remove the  <![CDATA[]]> from the
XML
the XSL just displays the message as the following and throws out the
anchor
tags completely:

One of the swarms you have joined called "Whiskies Cat Food" has entered a
bid battle.  To view this swarm, click here.

Can you help me to get the anchor tag to display as an actual link that
can
be clicked on?
Thanks,
Tim




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--