[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Preloading Images
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|