Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Generating an IMG tag >Thread Next - Re: Generating an IMG tag Re: Generating an IMG tagTo: NULL Date: 9/2/2005 10:55:00 PM On 2 Sep 2005 14:35:21 -0700, amahmood5@u... wrote:
>Hi All,
>
>Many thanks for your replies. A little further searching of this group
>suggested the following successful solution;
>
><xsl:variable name="pc" select="percent"/>
><img src="images/{$pc}.png"/>
>
>Neil, it was indeed a lot of work! A single image won't work, because I
>wanted to give an indication of capacity and utilisation.
>
>(By the way, to see what I'm working on, have a look at
>http://www.uclan.ac.uk/other/iss/rover/computers.html
Yeah, I can see that (though the image link is broken, using images%5C
rather than images/ as the path).
However, it's *still much better* and simpler using CSS - your image
is simply a repeating 1 pixel wide GIF in green, over a darker green
background. Really, use CSS for this, it's much simpler than making
100 images (and much less to download & cache for Pocket PCs)
Make the background of a DIV the scale + dark green line, and then use
a SPAN inside the DIV, setting image width="98", "width="55" etc for
98 and 55% values. 1pixel gif, about 48 bytes. Background image about
250 bytes. HTML cost negligible.
> The web page is
>currently written directly as HTML. I'm rewriting it so that the data
>is XML, and the presentation is achieved by XSL. Got everything
>working, hope to deploy the revised method next week. By have data
>available as XML, I can easily render it differently for different
>purposes - I'm considering a version in WML for viewing on mobile
>phones! A textbook use for XML and XSLT!)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
