Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - How to display images when it is included in a text description >Thread Next - Re: How to display images when it is included in a text description Re: How to display images when it is included in a text descriptionTo: NULL Date: 8/5/2007 2:01:00 PM klingus@g... wrote: > I am in need of some xslt assistance. My xslt isn't > rendering the <img> tag when it is copied to the html > page. That's because there's no <img/> element in your <description>, just the text saying '<img.../>'. > As you can see from the pasted code, the xml has in the > <description> tag embedded <img>... No, it doesn't. > "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> No respect for 78 chars rule... chances of getting a useful answer quartered. > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > lang="en"> <head> > <title>XML Transform : Firefox and IE</title> > <style> Your XHTML is invalid. type attribute is mandatory (XHTML 1.0 2E, A.1.1). > <script> See above. > <body onLoad="runTransform()"> There's no onLoad attribute in XHTML. See the spec if you don't believe me (XHTML 1.0 2E, 4.2). > XML: > <?xml version="1.0" encoding="ISO-8859-1"?> > <item> > <title>Bridge search ends for day with no luck > (AP)</title> <description><p><a > href="http://us.rd.yahoo.com/dailynews/rss/ > us/*http://news.yahoo.com/s/ap/20070805/ap_on_re_us/ > bridge_collapse"><img > src="http://d.yimg.com/us.yimg.com/p/ap/ 20070804/ > capt.b25df21cf4b0422e9074c64fac8e72e5.bush_bridge_collapse_wxs108.jpg? > x=130&y=82&sig=W0JdM0O4ep3mPDPq7pz2.w--" > align="left" height="82" width="130" alt="Divers continue > the search for bodies among the debris of the collapsed > Interstate 35W bridge, just yards away from where > President Bush was meeting with public officials and > emergency crews in Minneapolis, Saturday, Aug. 4, 2007. > The number of dead stands at five, but authorities said > another eight bodies likely were trapped in the wreckage. > (AP Photo/Joey McLeister, Pool)" border="0" /></a>AP - > Divers spent a third fruitless day searching for victims > of a deadly bridge collapse, finding no bodies inside a > crushed car pulled earlier Saturday from the murky > Mississippi River waters.</p><br > clear="all"/></description> </item> You don't understand the difference between markup and text that just happens to look like markup, do you? Strangely enough, after fixing this (as well as all the other problems introduced by posting without respect for usenet posting guidelines and serving the resulting document as text/html instead of application/xhtml+xml) your script worked just fine in both Firefox 2 and MSIE 6. Of course, it just silently fails if JS is disabled, but I don't suppose that bothers you much. -- roy axenov If only we smelled each other's asses, there wouldn't be any war.--Dustin Hoffman | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
