Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to display images when it is included in a text description

From: roy axenov <r_axenov@----.-->
To: 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>&#60;p>&#60;a
> href="http://us.rd.yahoo.com/dailynews/rss/
> us/*http://news.yahoo.com/s/ap/20070805/ap_on_re_us/
> bridge_collapse">&#60;img
> src="http://d.yimg.com/us.yimg.com/p/ap/ 20070804/
>
capt.b25df21cf4b0422e9074c64fac8e72e5.bush_bridge_collapse_wxs108.jpg?
> x=130&amp;y=82&amp;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" />&#60;/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.&#60;/p>&#60;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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent