[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: Preloading Images
Subject: Re: Preloading Images From: Dan Morrison <dman@xxxxxxxx> Date: Tue, 18 Jul 2000 23:30:43 +1200 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Preloading Images, Kay Michael | Thread | Formatting the body tag, Sia Rahimi |
Multiple ifs (Was: RE: Simplified p, Jeni Tennison | Date | Re: Problem resolving base URI in d, Jeni Tennison |
Month |