Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - xsl display of URLs [Thread Next] Re: xsl display of URLsTo: NULL Date: 12/8/2005 3:16:00 PM <AndyFlashREMOVE@t...> wrote in message
news:367gp1t1mh5fbohn9rv24i7k1hldpn3d8o@4......
> Hi all.
>
> Well I picked a great project for my first stab at learning xslt. I've
> been trying for hours to get an xml style sheet to transform the
> following XML into a display of URLs.
>
> Can anyone help with this. The problem so far is with the use of "<"
> characters in the <a href= section.
>
> I have read a few examples but it isn't making sense yet. I'd
> appreciate some help until I can source a decent book on the subject.
>
> What I want to end up with is something like this:
> <a href="http://www.awebsite.com/">A website</a>
>
>
> <?xml version="1.0" encoding="utf-8" ?>
> <?xml-stylesheet type="text/xsl" href="mylinks.xslt"?>
> <Links>
> <Link>
> <description>CNN News</description>
> <url>http://www.cnn.com/</url>
> </Link>
> <Link>
> <description>Guitar Tabs</description>
> <url>http://www.mxtabs.net/</url>
> </Link>
> </Links>
>
>
As you haven't shown your XSL it's difficult but if you want to embed the
value of an expression into an attribute the easiest way is to attribute
value templates, so when processing each Link:
<a href="{url}"><xsl:value-of select="description" /></a>
--
Joe
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
