[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Preloading Images

Subject: Re: Preloading Images
From: Dan Morrison <dman@xxxxxxxx>
Date: Tue, 18 Jul 2000 23:30:43 +1200
preloading images in body tag
Kay Michael wrote:
> 
> Someone gave you a simple solution by redefining the problem, but for the
> record, it's not difficult to get the output you want. 

Quite true. I was of course aiming at providing some clear building
blocks rather than the one-off solution.

I would be concerned about defining the <body> tag as appearing
dependant on when the LeftNavList gets found - That's gotta hurt the
logic.
And I also abstracted to problem out /because/ of the sensitivity that
Javascript has to whitespace.

You illustration of the legendary

<xsl:if test="position()!=last()">,</xsl:if>

(... which is a good stumbling block for folks trying this at home) 
is added value of course :-)

Me, I'm just glad I found a question that wasn't about bloody Xerces or
FO to chip in on again... 

.dan.

> <xsl:template match="LeftNavList">
>   <body bgcolor="#ffffff">
>     <xsl:attribute name="onLoad">PreloadImages(
>        <xsl:for-each select="PreLoadImage">
>          '<xsl:value-of select=".">.gif'
>          <xsl:if test="position()!=last()">,</xsl:if>
>        </xsl:for-each>);</xsl:attribute>
>   </body>
> </xsl:template>
> 
> You may want to adjust that a bit for whitespace.
> 
> Mike Kay
 

-- 
:=====================:====================:
: Dan Morrison        : The Web Limited    :
:  http://here.is/dan :  http://web.co.nz  :
:  dman@xxxxxxxx      :  danm@xxxxxxxxx    :
:  04 384 1472        :  04 495 8250       :
:  025 207 1140       :                    :
:.....................:....................:
: If ignorance is bliss, why aren't more people happy?
:.........................................:


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.